Tweaks to shader to fix warnings on with ATI drivers

This commit is contained in:
Robert Osfield 2009-04-03 09:54:15 +00:00
parent 9f8ab41556
commit 7a56842ef5

View File

@ -66,7 +66,7 @@ createStateSet()
"{ \n" "{ \n"
// Using the instance ID, generate "texture coords" for this instance. // Using the instance ID, generate "texture coords" for this instance.
"vec2 tC; \n" "vec2 tC; \n"
"const float r = gl_InstanceID / 32.; \n" "float r = float(gl_InstanceID) / 32.; \n"
"tC.s = fract( r ); tC.t = floor( r ) / 32.; \n" "tC.s = fract( r ); tC.t = floor( r ) / 32.; \n"
// Get the color from the OSG logo. // Get the color from the OSG logo.
"gl_FrontColor = texture2D( osgLogo, tC ); \n" "gl_FrontColor = texture2D( osgLogo, tC ); \n"