Index: binaries/data/mods/public/shaders/glsl/model_waterfall.fs
===================================================================
--- binaries/data/mods/public/shaders/glsl/model_waterfall.fs	(revision 12908)
+++ binaries/data/mods/public/shaders/glsl/model_waterfall.fs	(working copy)
@@ -41,7 +41,7 @@
       #if USE_SHADOW_PCF
         vec2 offset = fract(v_shadow.xy - 0.5);
         vec4 size = vec4(offset + 1.0, 2.0 - offset);
-        vec4 weight = (vec4(2.0 - 1.0 / size.xy, 1.0 / size.zw - 1.0) + (v_shadow.xy - offset).xyxy) * shadowScale.zwzw;
+        vec4 weight = (vec4(1.0, 1.0, -0.5, -0.5) + (v_shadow.xy - 0.5*offset).xyxy) * shadowScale.zwzw;
         return (1.0/9.0)*dot(size.zxzx*size.wwyy,
           vec4(shadow2D(shadowTex, vec3(weight.zw, v_shadow.z)).r,
                shadow2D(shadowTex, vec3(weight.xw, v_shadow.z)).r,
Index: binaries/data/mods/public/shaders/glsl/terrain_common.fs
===================================================================
--- binaries/data/mods/public/shaders/glsl/terrain_common.fs	(revision 12908)
+++ binaries/data/mods/public/shaders/glsl/terrain_common.fs	(working copy)
@@ -76,7 +76,7 @@
       #if USE_SHADOW_PCF
         vec2 offset = fract(v_shadow.xy - 0.5);
         vec4 size = vec4(offset + 1.0, 2.0 - offset);
-        vec4 weight = (vec4(2.0 - 1.0 / size.xy, 1.0 / size.zw - 1.0) + (v_shadow.xy - offset).xyxy) * shadowScale.zwzw;
+        vec4 weight = (vec4(1.0, 1.0, -0.5, -0.5) + (v_shadow.xy - 0.5*offset).xyxy) * shadowScale.zwzw;
         return (1.0/9.0)*dot(size.zxzx*size.wwyy,
           vec4(shadow2D(shadowTex, vec3(weight.zw, biasedShdwZ)).r,
                shadow2D(shadowTex, vec3(weight.xw, biasedShdwZ)).r,
Index: binaries/data/mods/public/shaders/glsl/model_water.fs
===================================================================
--- binaries/data/mods/public/shaders/glsl/model_water.fs	(revision 12908)
+++ binaries/data/mods/public/shaders/glsl/model_water.fs	(working copy)
@@ -61,7 +61,7 @@
       #if USE_SHADOW_PCF
         vec2 offset = fract(coords.xy - 0.5);
         vec4 size = vec4(offset + 1.0, 2.0 - offset);
-        vec4 weight = (vec4(2.0 - 1.0 / size.xy, 1.0 / size.zw - 1.0) + (coords.xy - offset).xyxy) * shadowScale.zwzw;
+		vec4 weight = (vec4(1.0, 1.0, -0.5, -0.5) + (coords.xy - 0.5*offset).xyxy) * shadowScale.zwzw;
         return (1.0/9.0)*dot(size.zxzx*size.wwyy,
           vec4(shadow2D(shadowTex, vec3(weight.zw, coords.z)).r,
                shadow2D(shadowTex, vec3(weight.xw, coords.z)).r,
Index: binaries/data/mods/public/shaders/glsl/model_common.fs
===================================================================
--- binaries/data/mods/public/shaders/glsl/model_common.fs	(revision 12908)
+++ binaries/data/mods/public/shaders/glsl/model_common.fs	(working copy)
@@ -74,7 +74,7 @@
       #if USE_SHADOW_PCF
         vec2 offset = fract(v_shadow.xy - 0.5);
         vec4 size = vec4(offset + 1.0, 2.0 - offset);
-        vec4 weight = (vec4(2.0 - 1.0 / size.xy, 1.0 / size.zw - 1.0) + (v_shadow.xy - offset).xyxy) * shadowScale.zwzw;
+        vec4 weight = (vec4(1.0, 1.0, -0.5, -0.5) + (v_shadow.xy - 0.5*offset).xyxy) * shadowScale.zwzw;
         return (1.0/9.0)*dot(size.zxzx*size.wwyy,
           vec4(shadow2D(shadowTex, vec3(weight.zw, biasedShdwZ)).r,
                shadow2D(shadowTex, vec3(weight.xw, biasedShdwZ)).r,
Index: binaries/data/mods/public/shaders/glsl/water_high.fs
===================================================================
--- binaries/data/mods/public/shaders/glsl/water_high.fs	(revision 12908)
+++ binaries/data/mods/public/shaders/glsl/water_high.fs	(working copy)
@@ -58,7 +58,7 @@
 				#if USE_SHADOW_PCF
 					vec2 offset = fract(coords.xy - 0.5);
 					vec4 size = vec4(offset + 1.0, 2.0 - offset);
-					vec4 weight = (vec4(2.0 - 1.0 / size.xy, 1.0 / size.zw - 1.0) + (coords.xy - offset).xyxy) * shadowScale.zwzw;
+					vec4 weight = (vec4(1.0, 1.0, -0.5, -0.5) + (coords.xy - 0.5*offset).xyxy) * shadowScale.zwzw;
 					return (1.0/9.0)*dot(size.zxzx*size.wwyy,
 										 vec4(shadow2D(shadowTex, vec3(weight.zw, coords.z)).r,
 											  shadow2D(shadowTex, vec3(weight.xw, coords.z)).r,
Index: binaries/data/mods/public/shaders/arb/model_common.fp
===================================================================
--- binaries/data/mods/public/shaders/arb/model_common.fp	(revision 12908)
+++ binaries/data/mods/public/shaders/arb/model_common.fp	(working copy)
@@ -94,16 +94,10 @@
       FRC offset.xy, offset;
       ADD size.xy, offset, 1.0;
       SUB size.zw, 2.0, offset.xyxy;
-      RCP weight.x, size.x;
-      RCP weight.y, size.y;
-      RCP weight.z, size.z;
-      RCP weight.w, size.w;
-      SUB weight.xy, 2.0, weight;
-      SUB weight.zw, weight, 1.0;
 
-      SUB offset.xy, v_shadow, offset;
+      MAD offset.xy, -0.5, offset, v_shadow;
       MOV offset.z, biasedShdw.z;
-      ADD weight, weight, offset.xyxy;
+      ADD weight, { 1.0, 1.0, -0.5, -0.5 }, offset.xyxy;
       MUL weight, weight, shadowScale.zwzw;
 
       MOV offset.xy, weight.zwww;
Index: binaries/data/mods/public/shaders/arb/terrain_common.fp
===================================================================
--- binaries/data/mods/public/shaders/arb/terrain_common.fp	(revision 12908)
+++ binaries/data/mods/public/shaders/arb/terrain_common.fp	(working copy)
@@ -48,16 +48,10 @@
       FRC offset.xy, offset;
       ADD size.xy, offset, 1.0;
       SUB size.zw, 2.0, offset.xyxy;
-      RCP weight.x, size.x;
-      RCP weight.y, size.y;
-      RCP weight.z, size.z;
-      RCP weight.w, size.w;
-      SUB weight.xy, 2.0, weight;
-      SUB weight.zw, weight, 1.0;
 
-      SUB offset.xy, fragment.texcoord[2], offset;
-      MOV offset.z, biasedShdw;
-      ADD weight, weight, offset.xyxy;
+      MAD offset.xy, -0.5, offset, fragment.texcoord[2];
+      MOV offset.z, biasedShdw.z;
+      ADD weight, { 1.0, 1.0, -0.5, -0.5 }, offset.xyxy;
       MUL weight, weight, shadowScale.zwzw;
 
       MOV offset.xy, weight.zwww;
