summaryrefslogtreecommitdiffstats
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
parent0e799e0b9817da74810b4c3b5d17128017dda499 (diff)
- already fixed scanline issue also applied for swapped orientation (nw)
-rw-r--r--bgfx/shaders/dx11/chains/hlsl/fs_post.binbin3550 -> 3630 bytes
-rw-r--r--bgfx/shaders/dx9/chains/hlsl/fs_post.binbin3123 -> 3139 bytes
-rw-r--r--bgfx/shaders/gles/chains/hlsl/fs_post.binbin5017 -> 5366 bytes
-rw-r--r--bgfx/shaders/glsl/chains/hlsl/fs_post.binbin4769 -> 5106 bytes
-rw-r--r--bgfx/shaders/metal/chains/hlsl/fs_post.binbin5468 -> 5833 bytes
-rw-r--r--hlsl/bloom.fx11
-rw-r--r--hlsl/post.fx10
-rw-r--r--src/osd/modules/render/bgfx/shaders/chains/hlsl/fs_post.sc10
8 files changed, 18 insertions, 13 deletions
diff --git a/bgfx/shaders/dx11/chains/hlsl/fs_post.bin b/bgfx/shaders/dx11/chains/hlsl/fs_post.bin
index 927c16d8057..b22fb024fb8 100644
--- a/bgfx/shaders/dx11/chains/hlsl/fs_post.bin
+++ b/bgfx/shaders/dx11/chains/hlsl/fs_post.bin
Binary files differ
diff --git a/bgfx/shaders/dx9/chains/hlsl/fs_post.bin b/bgfx/shaders/dx9/chains/hlsl/fs_post.bin
index df24551cb4e..8cc13a336da 100644
--- a/bgfx/shaders/dx9/chains/hlsl/fs_post.bin
+++ b/bgfx/shaders/dx9/chains/hlsl/fs_post.bin
Binary files differ
diff --git a/bgfx/shaders/gles/chains/hlsl/fs_post.bin b/bgfx/shaders/gles/chains/hlsl/fs_post.bin
index f7039993aac..a48adbecf4f 100644
--- a/bgfx/shaders/gles/chains/hlsl/fs_post.bin
+++ b/bgfx/shaders/gles/chains/hlsl/fs_post.bin
Binary files differ
diff --git a/bgfx/shaders/glsl/chains/hlsl/fs_post.bin b/bgfx/shaders/glsl/chains/hlsl/fs_post.bin
index 49f23896de7..2bfa4c7145f 100644
--- a/bgfx/shaders/glsl/chains/hlsl/fs_post.bin
+++ b/bgfx/shaders/glsl/chains/hlsl/fs_post.bin
Binary files differ
diff --git a/bgfx/shaders/metal/chains/hlsl/fs_post.bin b/bgfx/shaders/metal/chains/hlsl/fs_post.bin
index ad8382250a9..ab0fc156fd5 100644
--- a/bgfx/shaders/metal/chains/hlsl/fs_post.bin
+++ b/bgfx/shaders/metal/chains/hlsl/fs_post.bin
Binary files differ
diff --git a/hlsl/bloom.fx b/hlsl/bloom.fx
index db23995d55b..42c65e6a45b 100644
--- a/hlsl/bloom.fx
+++ b/hlsl/bloom.fx
@@ -273,14 +273,11 @@ VS_OUTPUT vs_main(VS_INPUT Input)
Output.Color = Input.Color;
- float2 TexCoord = Input.TexCoord;
- TexCoord += 0.5f / TargetDims; // half texel offset correction (DX9)
+ Output.TexCoord = Input.TexCoord;
+ Output.TexCoord += 0.5f / TargetDims; // half texel offset correction (DX9)
- Output.TexCoord = TexCoord.xy;
-
- TexCoord += 0.5f / SourceDims;
-
- Output.BloomCoord = TexCoord.xy;
+ Output.BloomCoord = Output.TexCoord;
+ Output.BloomCoord += 0.5f / SourceDims;
return Output;
}
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;
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