summaryrefslogtreecommitdiffstatshomepage
path: root/hlsl
diff options
context:
space:
mode:
author ImJezze <jezze@gmx.net>2016-05-05 22:46:56 +0200
committer ImJezze <jezze@gmx.net>2016-05-05 22:46:56 +0200
commitbef70746af4168c68e05ba2fbb3922bd14dfbcaa (patch)
tree7f8099ae6de411ac17de71c1fdb30fa49334d18d /hlsl
parentb4b65439293f160f195e8fec9124e6a1bc43881b (diff)
Fixed half texel offset of 'source' shadow mask tile mode
Diffstat (limited to 'hlsl')
-rw-r--r--hlsl/post.fx4
1 files changed, 3 insertions, 1 deletions
diff --git a/hlsl/post.fx b/hlsl/post.fx
index dc7c4bd8322..eddc4bb8da5 100644
--- a/hlsl/post.fx
+++ b/hlsl/post.fx
@@ -194,7 +194,9 @@ float2 GetShadowCoord(float2 QuadCoord, float2 SourceCoord)
: shadowFrac.xy;
float2 shadowCoord = (shadowFrac * shadowUV);
- shadowCoord += 0.5f / shadowDims; // fix half texel offset (DX9)
+ shadowCoord += ShadowTileMode == 0
+ ? 0.5f / shadowDims // fix half texel offset (DX9)
+ : 0.0f;
return shadowCoord;
}