]> git.rm.cloudns.org Git - xonotic/darkplaces.git/commitdiff
fixed bug in vsdct in cg
authoreihrul <eihrul@d7cf8633-e32d-0410-b094-e92efae38249>
Tue, 9 Mar 2010 02:03:47 +0000 (02:03 +0000)
committereihrul <eihrul@d7cf8633-e32d-0410-b094-e92efae38249>
Tue, 9 Mar 2010 02:03:47 +0000 (02:03 +0000)
git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@10047 d7cf8633-e32d-0410-b094-e92efae38249

gl_rmain.c
r_shadow.c

index 39b2d3a3e620844a2d985ac0d87b2e0f8d68ae65..4dda5da6386325df5b416d8a6824866e8bed56ec 100644 (file)
@@ -2303,7 +2303,7 @@ const char *builtincgshaderstring =
 "      float3 adir = abs(dir);\n"
 "      float2 aparams = ShadowMap_Parameters.xy / max(max(adir.x, adir.y), adir.z);\n"
 "      float4 proj = texCUBE(Texture_CubeProjection, dir);\n"
-"      return float3(lerp(dir.xy, proj.xy, dir.zz) * aparams.x + proj.zw * ShadowMap_Parameters.z, aparams.y + ShadowMap_Parameters.w);\n"
+"      return float3(lerp(dir.xy, dir.zz, proj.xy) * aparams.x + proj.zw * ShadowMap_Parameters.z, aparams.y + ShadowMap_Parameters.w);\n"
 "}\n"
 "#  else\n"
 "float3 GetShadowMapTC2D(float3 dir, float4 ShadowMap_Parameters)\n"
index e4f4c101f4c1a5642ea52edd38f491ddca462bda..8dc758f240457afaa77a29bfcb80806b7e1629a4 100644 (file)
@@ -373,7 +373,7 @@ skinframe_t *r_editlights_sprselection;
 void R_Shadow_SetShadowMode(void)
 {
        r_shadow_shadowmapmaxsize = bound(1, r_shadow_shadowmapping_maxsize.integer, (int)vid.maxtexturesize_2d / 4);
-       r_shadow_shadowmapvsdct = r_shadow_shadowmapping_vsdct.integer && !vid.cgcontext;
+       r_shadow_shadowmapvsdct = r_shadow_shadowmapping_vsdct.integer != 0;
        r_shadow_shadowmapfilterquality = r_shadow_shadowmapping_filterquality.integer;
        r_shadow_shadowmaptexturetype = r_shadow_shadowmapping_texturetype.integer;
        r_shadow_shadowmapdepthbits = r_shadow_shadowmapping_depthbits.integer;
@@ -4075,7 +4075,7 @@ void R_Shadow_PrepareLights(void)
 
        if (r_shadow_shadowmapmaxsize != bound(1, r_shadow_shadowmapping_maxsize.integer, (int)vid.maxtexturesize_2d / 4) ||
                (r_shadow_shadowmode != R_SHADOW_SHADOWMODE_STENCIL) != (r_shadow_shadowmapping.integer || r_shadow_deferred.integer) ||
-               r_shadow_shadowmapvsdct != (r_shadow_shadowmapping_vsdct.integer && !vid.cgcontext) || 
+               r_shadow_shadowmapvsdct != (r_shadow_shadowmapping_vsdct.integer != 0) || 
                r_shadow_shadowmaptexturetype != r_shadow_shadowmapping_texturetype.integer ||
                r_shadow_shadowmapfilterquality != r_shadow_shadowmapping_filterquality.integer || 
                r_shadow_shadowmapdepthbits != r_shadow_shadowmapping_depthbits.integer ||