From 74f90ed9a4d349a4abdb728547b96c153713db19 Mon Sep 17 00:00:00 2001 From: Robert Osfield Date: Thu, 17 Nov 2005 11:22:09 +0000 Subject: [PATCH] From Mike Weiblen, "fix for another one of those GLSL syntax errors that slip thru the nvidia compiler. gl_TexCoord[] is an array of vec4, and must be reduced to a vec2 for use with texture2D()" --- examples/osgdepthshadow/osgdepthshadow.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/osgdepthshadow/osgdepthshadow.cpp b/examples/osgdepthshadow/osgdepthshadow.cpp index 35c1247f7..23deaf03d 100644 --- a/examples/osgdepthshadow/osgdepthshadow.cpp +++ b/examples/osgdepthshadow/osgdepthshadow.cpp @@ -283,7 +283,7 @@ char fragmentShaderSource_withBaseTexture[] = "\n" "void main(void) \n" "{ \n" - " vec4 color = gl_Color * texture2D( baseTexture, gl_TexCoord[0] ); \n" + " vec4 color = gl_Color * texture2D( baseTexture, gl_TexCoord[0].xy ); \n" " gl_FragColor = color * (ambientBias.x + shadow2DProj( shadowTexture, gl_TexCoord[1] ) * ambientBias.y); \n" "}\n";