Archive 17/01/2023.

Some glitches with OGL and GLES

orefkov

I work on some mobile game (Urho3DPlayer + AngelScript) and test it on device (GLES), and computer DX9 and OGL.
In DX9 version no problem. On GLES and OGL I have glitches. Some screenshots.
This is screen from mobile, in 50% the game start as shown, and that result is good for me. Look at “stone” material on “portal”
Mobile-2
But in ~50% runs - game start as
Mobile-1
Stone above portal is dark.

On computer in DX9 game always start as shown:
Scene DX9
In OGL game always start as
Scene OpenGL
but if I move camera down, at some moment picture changed to
Scene OpenGL-down

Also on mobile if I add more models, sometimes portal looks like an exploding:
Mobile-3
but sometimes all good.

For portal I use DiffNormal technique, other model simple Diff techique.
What could be the problem?

JTippetts

Are you sure you are actually supplying tangents for the portal? Sometimes you can get those kinds of glitches if a shader expects some bit of data, such as tangents, but that data isn’t provided. In which case, it just uses whatever old bit of data is there. Sorta like using an uninitialized array. Double check that your portal model has been exported with tangents, since it is using the DiffNormal technique.

orefkov

Many thanks. Really, on export from Blender, forgot toggle “Tangent” check box. Early exported with tangents, and all work fine. At some moment I was change portal’s model and export without tangent.