ATI woes…
Started the day nicely by fixing the bug with the planetary landing… the issue was that now we have two dropship objects (one in the ship, the other one in the planet), since we now preload the planet data, and the game decided that when it was the time to have the landing cutscene, it should point to the one in the ship, hence the weird angles…
That was fixed by adding a “priority” to the objects in the current area and having the name matching included only the initial characters when this is the case…
Then I found a big problem… I knew the backend of the GLSL compilers were different from vendor to vendor, but I didn’t expect the actual interpretation of the syntax to be different…
So now, all my GLSL shaders fail with this video card, because they don’t like certain stuff… Some I can understand:
float xpto=1;
This succeeds in nVidia cards, but fails in ATI cards, because “1” is an integer, not a float… I usually use:
float xpto=1.0;
So this isn’t a problem, except some places where I didn’t use that for some reason, and those are easy to track…
A much worse problem is that I use extensively the #line keyword, to provide me with a better way to debug shaders, especially since my shaders are spread throughout a lot of files… The normal (C-like) syntax is:
#line line_number “source_file”
But guess what?! ATI cards don’t support this… They want:
#line line_number source_file_index
So I had to add indexing of the source files, which made me waste most of my evening…
A friend of fine kindly sent me a link with some other pitfalls I have to watch out for, so I’ll have to review that in some depth before carrying on the work on this…
Now listening to “Follow the Leader” by “Korn”
Link of the Day: Some interesting info on correct usage of GLSL and shaders in general in OpenGL: https://www.opengl.org/wiki/GLSL_:_common_mistakes
Comment
You must be logged in to post a comment.