"# 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"
"# 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"