summaryrefslogtreecommitdiffstats
path: root/hlsl/post.fx
diff options
context:
space:
mode:
Diffstat (limited to 'hlsl/post.fx')
-rw-r--r--hlsl/post.fx10
1 files changed, 7 insertions, 3 deletions
diff --git a/hlsl/post.fx b/hlsl/post.fx
index 6d8077e2037..717c919d8a7 100644
--- a/hlsl/post.fx
+++ b/hlsl/post.fx
@@ -253,9 +253,13 @@ float4 ps_main(PS_INPUT Input) : COLOR
float ColorBrightness = 0.299f * BaseColor.r + 0.587f * BaseColor.g + 0.114 * BaseColor.b;
float ScanlineCoord = SourceCoord.y;
- ScanlineCoord += QuadDims.y <= SourceDims.y * 2.0f
- ? 0.5f / QuadDims.y // uncenter scanlines if the quad is less than twice the size of the source
- : 0.0f;
+ ScanlineCoord += SwapXY
+ ? QuadDims.x <= SourceDims.x * 2.0f
+ ? 0.5f / QuadDims.x // uncenter scanlines if the quad is less than twice the size of the source
+ : 0.0f
+ : QuadDims.y <= SourceDims.y * 2.0f
+ ? 0.5f / QuadDims.y // uncenter scanlines if the quad is less than twice the size of the source
+ : 0.0f;
ScanlineCoord *= SourceDims.y * ScanlineScale * PI;