From: havoc Date: Wed, 30 Nov 2011 09:30:08 +0000 (+0000) Subject: fix GLSL compile errors caused by use of * 64 rather than * 64.0 (oops) X-Git-Tag: xonotic-v0.6.0~102^2~35 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=d708be69a96b90d2222a6452aeac542a50166bc6;p=xonotic%2Fdarkplaces.git fix GLSL compile errors caused by use of * 64 rather than * 64.0 (oops) git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@11584 d7cf8633-e32d-0410-b094-e92efae38249 --- diff --git a/shader_glsl.h b/shader_glsl.h index c133ba28..8c13a2a6 100644 --- a/shader_glsl.h +++ b/shader_glsl.h @@ -769,11 +769,11 @@ "{\n" " vec3 adir = abs(dir);\n" " float m = max(max(adir.x, adir.y), adir.z);\n" -" vec2 mparams = ShadowMap_Parameters.xy / m;\n" " vec4 proj = dp_textureCube(Texture_CubeProjection, dir);\n" "#ifdef USEDEPTHRGB\n" -" return vec3(mix(dir.xy, dir.zz, proj.xy) * mparams.x + proj.zw * ShadowMap_Parameters.z, m + 64 * ShadowMap_Parameters.w);\n" +" return vec3(mix(dir.xy, dir.zz, proj.xy) * (ShadowMap_Parameters.x / m) + proj.zw * ShadowMap_Parameters.z, m + 64.0 * ShadowMap_Parameters.w);\n" "#else\n" +" vec2 mparams = ShadowMap_Parameters.xy / m;\n" " return vec3(mix(dir.xy, dir.zz, proj.xy) * mparams.x + proj.zw * ShadowMap_Parameters.z, mparams.y + ShadowMap_Parameters.w);\n" "#endif\n" "}\n" @@ -785,7 +785,7 @@ " if (adir.x > adir.y) { m = adir.x; proj = vec4(dir.zyx, 0.5); } else { m = adir.y; proj = vec4(dir.xzy, 1.5); }\n" " if (adir.z > m) { m = adir.z; proj = vec4(dir, 2.5); }\n" "#ifdef USEDEPTHRGB\n" -" return vec3(proj.xy * ShadowMap_Parameters.x / m + vec2(0.5,0.5) + vec2(proj.z < 0.0 ? 1.5 : 0.5, proj.w) * ShadowMap_Parameters.z, m + 64 * ShadowMap_Parameters.w);\n" +" return vec3(proj.xy * (ShadowMap_Parameters.x / m) + vec2(0.5,0.5) + vec2(proj.z < 0.0 ? 1.5 : 0.5, proj.w) * ShadowMap_Parameters.z, m + 64.0 * ShadowMap_Parameters.w);\n" "#else\n" " vec2 mparams = ShadowMap_Parameters.xy / m;\n" " return vec3(proj.xy * mparams.x + vec2(proj.z < 0.0 ? 1.5 : 0.5, proj.w) * ShadowMap_Parameters.z, mparams.y + ShadowMap_Parameters.w);\n"