]> git.rm.cloudns.org Git - xonotic/darkplaces.git/commitdiff
fix another dp_shadow2D call
authordivverent <divverent@d7cf8633-e32d-0410-b094-e92efae38249>
Fri, 25 Mar 2011 21:39:02 +0000 (21:39 +0000)
committerRudolf Polzer <divverent@alientrap.org>
Sat, 26 Mar 2011 18:49:59 +0000 (19:49 +0100)
git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@10967 d7cf8633-e32d-0410-b094-e92efae38249
::stable-branch::merge=c5570a37c35c7dc0ce97d8a7b16207f5ccc477ad

shader_glsl.h

index f6156301131cb2cc64d3c8f3e3369c12e0ad95f5..0a43d2ef994b21ef82054bf7a351cf9c485d4a3c 100644 (file)
@@ -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"
 "\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"