]> git.xonotic.org Git - xonotic/darkplaces.git/commitdiff
fix fix for shadow sampler sampling
authoreihrul <eihrul@d7cf8633-e32d-0410-b094-e92efae38249>
Sun, 11 Sep 2011 19:03:05 +0000 (19:03 +0000)
committereihrul <eihrul@d7cf8633-e32d-0410-b094-e92efae38249>
Sun, 11 Sep 2011 19:03:05 +0000 (19:03 +0000)
git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@11342 d7cf8633-e32d-0410-b094-e92efae38249

shader_glsl.h

index 9781b5a2658722615edc93d2ba45d02732210887..e54f7c438a21994f8be4921e08eae261dbedf3b1 100644 (file)
@@ -19,7 +19,7 @@
 "# 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"
@@ -32,7 +32,7 @@
 "# 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"