summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
author Jezze <jezze@gmx.net>2016-08-13 20:30:40 +0200
committer Jezze <jezze@gmx.net>2016-08-13 20:30:56 +0200
commit7dc76d6501b1ef8e342b71ec4212d31fd0955036 (patch)
tree9c9788dd25839cc6fa18e0b8aa0ebb417cea5b8a /src
parent0e799e0b9817da74810b4c3b5d17128017dda499 (diff)
- already fixed scanline issue also applied for swapped orientation (nw)
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