"# define dp_texture2D texture\n"
"# define dp_texture3D texture\n"
"# define dp_textureCube texture\n"
-"# define dp_shadow2D(a,b) texture(a,b)\n"
+"# define dp_shadow2D(a,b) float(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(a,b) (shadow2D(a,b).r)\n"
+"# define dp_shadow2D(a,b) float(shadow2D(a,b))\n"
"#endif\n"
"\n"
"// GL ES and GLSL130 shaders use precision modifiers, standard GL does not\n"