From: divverent Date: Fri, 25 Mar 2011 21:39:02 +0000 (+0000) Subject: fix another dp_shadow2D call X-Git-Tag: xonotic-v0.6.0~163^2~579 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=c5570a37c35c7dc0ce97d8a7b16207f5ccc477ad;p=xonotic%2Fdarkplaces.git fix another dp_shadow2D call git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@10967 d7cf8633-e32d-0410-b094-e92efae38249 --- diff --git a/shader_glsl.h b/shader_glsl.h index b9f5abf5..8748c5ef 100644 --- a/shader_glsl.h +++ b/shader_glsl.h @@ -25,7 +25,7 @@ "# define dp_texture2D texture\n" "# define dp_texture3D texture\n" "# define dp_textureCube texture\n" -"# define dp_shadow2D texture\n" +"# define dp_shadow2D(a,b) texture(a,b)\n" "#else\n" "# ifdef FRAGMENT_SHADER\n" "# define dp_FragColor gl_FragColor\n" @@ -38,7 +38,7 @@ "# define dp_texture2D texture2D\n" "# define dp_texture3D texture3D\n" "# define dp_textureCube textureCube\n" -"# define dp_shadow2D shadow2D\n" +"# define dp_shadow2D(a,b) float(shadow2D(a,b))\n" "#endif\n" "\n" "#ifdef VERTEX_SHADER\n" @@ -703,11 +703,11 @@ "\n" "# ifdef USESHADOWSAMPLER\n" "# ifdef USESHADOWMAPPCF\n" -"# define texval(x, y) float(dp_shadow2D(Texture_ShadowMap2D, vec3(center + vec2(x, y)*ShadowMap_TextureScale, shadowmaptc.z))) \n" +"# define texval(x, y) dp_shadow2D(Texture_ShadowMap2D, vec3(center + vec2(x, y)*ShadowMap_TextureScale, shadowmaptc.z)) \n" " vec2 center = shadowmaptc.xy*ShadowMap_TextureScale;\n" " f = dot(vec4(0.25), vec4(texval(-0.4, 1.0), texval(-1.0, -0.4), texval(0.4, -1.0), texval(1.0, 0.4)));\n" "# else\n" -" f = dp_shadow2D(Texture_ShadowMap2D, vec3(shadowmaptc.xy*ShadowMap_TextureScale, shadowmaptc.z)).r;\n" +" f = dp_shadow2D(Texture_ShadowMap2D, vec3(shadowmaptc.xy*ShadowMap_TextureScale, shadowmaptc.z));\n" "# endif\n" "# else\n" "# ifdef USESHADOWMAPPCF\n"