summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/osd/modules/render/bgfx/shaders/chains/hlsl/fs_post.sc10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/osd/modules/render/bgfx/shaders/chains/hlsl/fs_post.sc b/src/osd/modules/render/bgfx/shaders/chains/hlsl/fs_post.sc
index a0d6f56772a..63800bb61d3 100644
--- a/src/osd/modules/render/bgfx/shaders/chains/hlsl/fs_post.sc
+++ b/src/osd/modules/render/bgfx/shaders/chains/hlsl/fs_post.sc
@@ -149,9 +149,13 @@ void main()
float ColorBrightness = 0.299 * BaseColor.r + 0.587 * BaseColor.g + 0.114 * BaseColor.b;
float ScanCoord = BaseCoord.y;
- ScanCoord += u_quad_dims.y <= u_source_dims.y * 2.0f
- ? 0.5f / u_quad_dims.y // uncenter scanlines if the quad is less than twice the size of the source
- : 0.0f;
+ ScanCoord += u_swap_xy.x > 0.0
+ ? u_quad_dims.x <= u_source_dims.x * 2.0
+ ? 0.5 / u_quad_dims.x // uncenter scanlines if the quad is less than twice the size of the source
+ : 0.0
+ : u_quad_dims.y <= u_source_dims.y * 2.0
+ ? 0.5 / u_quad_dims.y // uncenter scanlines if the quad is less than twice the size of the source
+ : 0.0;
ScanCoord *= u_source_dims.y * u_scanline_scale.x * 3.1415927; // PI