GLSL differences

All topics about ZGameEditor goes here.

Moderator: Moderators

Post Reply
User avatar
VilleK
Site Admin
Posts: 2277
Joined: Mon Jan 15, 2007 4:50 pm
Location: Stockholm, Sweden
Contact:

GLSL differences

Post 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.
User avatar
jph_wacheski
Posts: 1005
Joined: Sat Feb 16, 2008 8:10 pm
Location: Canada
Contact:

Post by jph_wacheski »

oh, good pont., <adds some decimles> all is well. thanks. ;)
iterationGAMES.com
User avatar
VilleK
Site Admin
Posts: 2277
Joined: Mon Jan 15, 2007 4:50 pm
Location: Stockholm, Sweden
Contact:

Post 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.
User avatar
Kjell
Posts: 1883
Joined: Sat Feb 23, 2008 11:15 pm

Post 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
Attachments
FBO.jpg
FBO.jpg (38.41 KiB) Viewed 7485 times
User avatar
VilleK
Site Admin
Posts: 2277
Joined: Mon Jan 15, 2007 4:50 pm
Location: Stockholm, Sweden
Contact:

Post 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.
Post Reply