Page 1 of 1

GLSL differences

Posted: Thu Dec 10, 2009 4:03 pm
by VilleK
If you are using shaders then beware of differences between nVidia and ATI in GLSL-syntax.

From: http://www.opengl.org/wiki/GLSL_:_common_mistakes
nVidia drivers are more relaxed. For example:

float myvalue = 0;

This is not legal according to the OpenGL Shading Language specification, due to the inability to automatically convert from integers (numbers without decimals) to floats (numbers with decimals). Use 0.0 instead.

Posted: Thu Dec 10, 2009 4:09 pm
by jph_wacheski
oh, good pont., <adds some decimles> all is well. thanks. ;)

Posted: Sat Dec 12, 2009 2:51 pm
by VilleK
Found more useful info here:

http://www.pouet.net/topic.php?which=5495&page=1

For instance:
Nvidia allows a shader program with a fragment shader and no vertex shader, ATI doesn't. They supposedly fixed this in recent drivers, I haven't tried it though.

Posted: Sat Dec 12, 2009 3:02 pm
by Kjell
:?
glCopyTexSubImage2D very slow on ATI when texture resolution isn't power of two
I guess that's why for example Virtools requires you to render a 320x180 viewport to a 512x256 FBO ( only using the 320x180 center rectangle of course ).

K

Posted: Mon Dec 14, 2009 8:39 pm
by VilleK
I have now ordered a new computer with ATI-card so hopefully in a couple of weeks I can begin testing ZGE-releases on both ATI and nVidia.