From 8cc91e8b7f1942d2d507a8a52ebb6ad036117216 Mon Sep 17 00:00:00 2001 From: havoc Date: Thu, 17 Mar 2011 17:34:47 +0000 Subject: [PATCH] fixes for GLSL syntax errors in the deferred geometry shader git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@10927 d7cf8633-e32d-0410-b094-e92efae38249 --- shader_glsl.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/shader_glsl.h b/shader_glsl.h index 8dee8966..15f95df3 100644 --- a/shader_glsl.h +++ b/shader_glsl.h @@ -785,7 +785,7 @@ "uniform highp mat4 ModelViewMatrix;\n" "void main(void)\n" "{\n" -" TexCoordSurfaceLightmap.xy = vec4((TexMatrix * Attrib_TexCoord0).xy, 0.0, 0.0);\n" +" TexCoordSurfaceLightmap = vec4((TexMatrix * Attrib_TexCoord0).xy, 0.0, 0.0);\n" "#ifdef USEVERTEXTEXTUREBLEND\n" " VertexColor = Attrib_Color;\n" " TexCoord2 = vec2(BackgroundTexMatrix * Attrib_TexCoord0);\n" @@ -800,9 +800,9 @@ " EyeVectorFogDepth.w = 0.0;\n" "#endif\n" "\n" -" VectorS = (ModelViewMatrix * vec4(Attrib_TexCoord1.xyz, 0)).xyz;\n" -" VectorT = (ModelViewMatrix * vec4(Attrib_TexCoord2.xyz, 0)).xyz;\n" -" VectorR = (ModelViewMatrix * vec4(Attrib_TexCoord3.xyz, 0)).xyz;\n" +" VectorS = (ModelViewMatrix * vec4(Attrib_TexCoord1.xyz, 0));\n" +" VectorT = (ModelViewMatrix * vec4(Attrib_TexCoord2.xyz, 0));\n" +" VectorR = (ModelViewMatrix * vec4(Attrib_TexCoord3.xyz, 0));\n" " gl_Position = ModelViewProjectionMatrix * Attrib_Position;\n" "}\n" "#endif // VERTEX_SHADER\n" @@ -840,7 +840,7 @@ " float a = offsetMappedTexture2D(Texture_Gloss).a;\n" "#endif\n" "\n" -" dp_FragColor = vec4(normalize(surfacenormal.x * VectorS + surfacenormal.y * VectorT + surfacenormal.z * VectorR) * 0.5 + vec3(0.5, 0.5, 0.5), a);\n" +" dp_FragColor = vec4(normalize(surfacenormal.x * VectorS.xyz + surfacenormal.y * VectorT.xyz + surfacenormal.z * VectorR.xyz) * 0.5 + vec3(0.5, 0.5, 0.5), a);\n" "}\n" "#endif // FRAGMENT_SHADER\n" "#else // !MODE_DEFERREDGEOMETRY\n" -- 2.39.2