From: eihrul Date: Sun, 11 Sep 2011 19:03:05 +0000 (+0000) Subject: fix fix for shadow sampler sampling X-Git-Tag: xonotic-v0.6.0~335 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=50fdce9d0286cad5877b91cac8b0d74edab0c5cd;p=xonotic%2Fdarkplaces.git fix fix for shadow sampler sampling git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@11342 d7cf8633-e32d-0410-b094-e92efae38249 ::stable-branch::merge=6ce3cc5b34e75de491de3ae697ecaa3fa862f959 --- diff --git a/shader_glsl.h b/shader_glsl.h index 9781b5a2..e54f7c43 100644 --- a/shader_glsl.h +++ b/shader_glsl.h @@ -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"