From: divverent Date: Wed, 23 Mar 2011 10:36:16 +0000 (+0000) Subject: we need one more glsl 130 compat ifdef... X-Git-Tag: xonotic-v0.6.0~163^2~586 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=f7a68acbd5e61740a7f03bc6937e365a56801767;p=xonotic%2Fdarkplaces.git we need one more glsl 130 compat ifdef... git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@10960 d7cf8633-e32d-0410-b094-e92efae38249 --- diff --git a/shader_glsl.h b/shader_glsl.h index 1b0c1b18..673c6a99 100644 --- a/shader_glsl.h +++ b/shader_glsl.h @@ -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" @@ -701,11 +703,11 @@ "\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"