From: havoc Date: Fri, 19 Feb 2010 15:10:54 +0000 (+0000) Subject: fix more cg shader errors X-Git-Tag: xonotic-v0.1.0preview~230^2~481 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=cac93010a96f10cce2f2c1e75624138beb67d678;p=xonotic%2Fdarkplaces.git fix more cg shader errors git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@9988 d7cf8633-e32d-0410-b094-e92efae38249 --- diff --git a/gl_rmain.c b/gl_rmain.c index 29b9585d..b10677be 100644 --- a/gl_rmain.c +++ b/gl_rmain.c @@ -2189,8 +2189,8 @@ const char *builtincgshaderstring = "{\n" " float3 adir = abs(dir);\n" " float2 aparams = ShadowMap_Parameters.xy / max(max(adir.x, adir.y), adir.z);\n" -" float4 proj = texCUBEe(Texture_CubeProjection, dir);\n" -" return float3(mix(dir.xy, dir.zz, proj.xy) * aparams.x + proj.zw * ShadowMap_Parameters.z, aparams.y + ShadowMap_Parameters.w);\n" +" float4 proj = texCUBE(Texture_CubeProjection, dir);\n" +" return float3(lerp(dir.xy, proj.xy, dir.zz) * aparams.x + proj.zw * ShadowMap_Parameters.z, aparams.y + ShadowMap_Parameters.w);\n" "}\n" "# else\n" "float3 GetShadowMapTC2D(float3 dir, float4 ShadowMap_Parameters)\n" @@ -2669,7 +2669,7 @@ const char *builtincgshaderstring = "out float4 EyeVectorModelSpaceFogPlaneVertexDist : TEXCOORD4,\n" "#endif\n" "#if defined(MODE_LIGHTSOURCE) || defined(MODE_LIGHTDIRECTION)\n" -"out float3 LightVector : TEXCOORD5,\n" +"out float3 LightVector : TEXCOORD1,\n" "#endif\n" "#ifdef MODE_LIGHTSOURCE\n" "out float3 CubeVector : TEXCOORD3,\n" @@ -2775,7 +2775,7 @@ const char *builtincgshaderstring = "float4 EyeVectorModelSpaceFogPlaneVertexDist : TEXCOORD4,\n" "#endif\n" "#if defined(MODE_LIGHTSOURCE) || defined(MODE_LIGHTDIRECTION)\n" -"float3 LightVector : TEXCOORD5,\n" +"float3 LightVector : TEXCOORD1,\n" "#endif\n" "#ifdef MODE_LIGHTSOURCE\n" "float3 CubeVector : TEXCOORD3,\n"