]> git.rm.cloudns.org Git - xonotic/darkplaces.git/commitdiff
we need one more glsl 130 compat ifdef...
authordivverent <divverent@d7cf8633-e32d-0410-b094-e92efae38249>
Wed, 23 Mar 2011 10:36:16 +0000 (10:36 +0000)
committerdivverent <divverent@d7cf8633-e32d-0410-b094-e92efae38249>
Wed, 23 Mar 2011 10:36:16 +0000 (10:36 +0000)
git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@10960 d7cf8633-e32d-0410-b094-e92efae38249

shader_glsl.h

index 1b0c1b18311b528ed1aa54097f593bd9fe2b1d3f..673c6a99de86383f0e0ea06e5d9be690a6cbca31 100644 (file)
@@ -25,6 +25,7 @@
 "# define dp_texture2D texture\n"
 "# define dp_texture3D texture\n"
 "# define dp_textureCube texture\n"
+"# define dp_shadow2D texture\n"
 "#else\n"
 "# ifdef FRAGMENT_SHADER\n"
 "#  define dp_FragColor gl_FragColor\n"
@@ -37,6 +38,7 @@
 "# define dp_texture2D texture2D\n"
 "# define dp_texture3D texture3D\n"
 "# define dp_textureCube textureCube\n"
+"# define dp_shadow2D shadow2D\n"
 "#endif\n"
 "\n"
 "#ifdef VERTEX_SHADER\n"
 "\n"
 "#  ifdef USESHADOWSAMPLER\n"
 "#    ifdef USESHADOWMAPPCF\n"
-"#      define texval(x, y) shadow2D(Texture_ShadowMap2D, vec3(center + vec2(x, y)*ShadowMap_TextureScale, shadowmaptc.z)).r  \n"
+"#      define texval(x, y) dp_shadow2D(Texture_ShadowMap2D, vec3(center + vec2(x, y)*ShadowMap_TextureScale, shadowmaptc.z)).r  \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 = shadow2D(Texture_ShadowMap2D, vec3(shadowmaptc.xy*ShadowMap_TextureScale, shadowmaptc.z)).r;\n"
+"      f = dp_shadow2D(Texture_ShadowMap2D, vec3(shadowmaptc.xy*ShadowMap_TextureScale, shadowmaptc.z)).r;\n"
 "#    endif\n"
 "#  else\n"
 "#    ifdef USESHADOWMAPPCF\n"