From 7a56842ef5408eec0d68ec7903c6157a9f89a379 Mon Sep 17 00:00:00 2001 From: Robert Osfield Date: Fri, 3 Apr 2009 09:54:15 +0000 Subject: [PATCH] Tweaks to shader to fix warnings on with ATI drivers --- examples/osgdrawinstanced/osgdrawinstanced.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/osgdrawinstanced/osgdrawinstanced.cpp b/examples/osgdrawinstanced/osgdrawinstanced.cpp index a0a223374..9b2a6b9a7 100644 --- a/examples/osgdrawinstanced/osgdrawinstanced.cpp +++ b/examples/osgdrawinstanced/osgdrawinstanced.cpp @@ -66,7 +66,7 @@ createStateSet() "{ \n" // Using the instance ID, generate "texture coords" for this instance. "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" // Get the color from the OSG logo. "gl_FrontColor = texture2D( osgLogo, tC ); \n"