summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
author ImJezze <jezze@gmx.net>2016-06-19 22:23:02 +0200
committer ImJezze <jezze@gmx.net>2016-06-20 00:03:44 +0200
commit2f06a08ec466b21223abe6de277889f269c45890 (patch)
tree1f1505b7d58623189573e99aa0031c20a05f0332
parentf056b622bcad7c19a521a9a5a181471ff301f5f2 (diff)
Small shader corrections (nw)
-rw-r--r--bgfx/shaders/dx11/chains/hlsl/fs_distortion.binbin3782 -> 3782 bytes
-rw-r--r--bgfx/shaders/dx11/chains/hlsl/fs_post.binbin3550 -> 3550 bytes
-rw-r--r--bgfx/shaders/dx9/chains/hlsl/fs_distortion.binbin2823 -> 2823 bytes
-rw-r--r--bgfx/shaders/dx9/chains/hlsl/fs_post.binbin3135 -> 3135 bytes
-rw-r--r--bgfx/shaders/gles/chains/hlsl/fs_distortion.binbin5285 -> 5285 bytes
-rw-r--r--bgfx/shaders/gles/chains/hlsl/fs_post.binbin5017 -> 5017 bytes
-rw-r--r--bgfx/shaders/glsl/chains/hlsl/fs_distortion.binbin5035 -> 5035 bytes
-rw-r--r--bgfx/shaders/glsl/chains/hlsl/fs_post.binbin4769 -> 4769 bytes
-rw-r--r--bgfx/shaders/metal/chains/hlsl/fs_distortion.binbin5581 -> 5581 bytes
-rw-r--r--bgfx/shaders/metal/chains/hlsl/fs_post.binbin5468 -> 5468 bytes
-rw-r--r--hlsl/distortion.fx4
-rw-r--r--hlsl/post.fx4
-rw-r--r--hlsl/vector.fx4
-rw-r--r--src/osd/modules/render/bgfx/shaders/chains/hlsl/fs_distortion.sc2
-rw-r--r--src/osd/modules/render/bgfx/shaders/chains/hlsl/fs_post.sc2
15 files changed, 8 insertions, 8 deletions
diff --git a/bgfx/shaders/dx11/chains/hlsl/fs_distortion.bin b/bgfx/shaders/dx11/chains/hlsl/fs_distortion.bin
index b86b2f303f9..41f4aef5d24 100644
--- a/bgfx/shaders/dx11/chains/hlsl/fs_distortion.bin
+++ b/bgfx/shaders/dx11/chains/hlsl/fs_distortion.bin
Binary files differ
diff --git a/bgfx/shaders/dx11/chains/hlsl/fs_post.bin b/bgfx/shaders/dx11/chains/hlsl/fs_post.bin
index 3aa4cd21700..927c16d8057 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_distortion.bin b/bgfx/shaders/dx9/chains/hlsl/fs_distortion.bin
index a89c29f59b6..d009657e88c 100644
--- a/bgfx/shaders/dx9/chains/hlsl/fs_distortion.bin
+++ b/bgfx/shaders/dx9/chains/hlsl/fs_distortion.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 4cbc9b2fb7b..451ddc62b05 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_distortion.bin b/bgfx/shaders/gles/chains/hlsl/fs_distortion.bin
index b40b16a3052..fa2f788eecc 100644
--- a/bgfx/shaders/gles/chains/hlsl/fs_distortion.bin
+++ b/bgfx/shaders/gles/chains/hlsl/fs_distortion.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 185b92fa882..f7039993aac 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_distortion.bin b/bgfx/shaders/glsl/chains/hlsl/fs_distortion.bin
index 1840874ea5a..15f466dbc53 100644
--- a/bgfx/shaders/glsl/chains/hlsl/fs_distortion.bin
+++ b/bgfx/shaders/glsl/chains/hlsl/fs_distortion.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 eda1c602e9f..49f23896de7 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_distortion.bin b/bgfx/shaders/metal/chains/hlsl/fs_distortion.bin
index fe7f7a4c495..2ea407b3195 100644
--- a/bgfx/shaders/metal/chains/hlsl/fs_distortion.bin
+++ b/bgfx/shaders/metal/chains/hlsl/fs_distortion.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 e261b0e6431..ad8382250a9 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/distortion.fx b/hlsl/distortion.fx
index 1ee1641e646..3b7a9d592e3 100644
--- a/hlsl/distortion.fx
+++ b/hlsl/distortion.fx
@@ -176,9 +176,9 @@ float GetRoundCornerFactor(float2 coord, float2 bounds, float radiusAmount, floa
smoothAmount = min(smoothAmount, radiusAmount);
float range = min(bounds.x, bounds.y);
- float amountMinimum = range > 0.0f ? 1.0f / range : 0.0f;
+ float amountMinimum = 1.0f / range;
float radius = range * max(radiusAmount, amountMinimum);
- float smooth = 1.0f / (range * max(smoothAmount, amountMinimum * 3.0f));
+ float smooth = 1.0f / (range * max(smoothAmount, amountMinimum * 2.0f));
// compute box
float box = roundBox(bounds * (coord * 2.0f), bounds, radius);
diff --git a/hlsl/post.fx b/hlsl/post.fx
index 93a871a629a..6d8077e2037 100644
--- a/hlsl/post.fx
+++ b/hlsl/post.fx
@@ -67,7 +67,7 @@ struct PS_INPUT
//-----------------------------------------------------------------------------
static const float PI = 3.1415927f;
-static const float PHI = 1.618034f;
+static const float HalfPI = PI * 0.5f;
//-----------------------------------------------------------------------------
// Scanline & Shadowmask Vertex Shader
@@ -259,7 +259,7 @@ float4 ps_main(PS_INPUT Input) : COLOR
ScanlineCoord *= SourceDims.y * ScanlineScale * PI;
- float ScanlineCoordJitter = ScanlineOffset * PHI;
+ float ScanlineCoordJitter = ScanlineOffset * HalfPI;
float ScanlineSine = sin(ScanlineCoord + ScanlineCoordJitter);
float ScanlineWide = ScanlineHeight + ScanlineVariation * max(1.0f, ScanlineHeight) * (1.0f - ColorBrightness);
float ScanlineAmount = pow(ScanlineSine * ScanlineSine, ScanlineWide);
diff --git a/hlsl/vector.fx b/hlsl/vector.fx
index 71d53d030bc..686b617bbd0 100644
--- a/hlsl/vector.fx
+++ b/hlsl/vector.fx
@@ -82,9 +82,9 @@ float GetRoundCornerFactor(float2 coord, float2 bounds, float radiusAmount, floa
smoothAmount = min(smoothAmount, radiusAmount);
float range = min(bounds.x, bounds.y);
- float amountMinimum = range > 0.0f ? 1.0f / range : 0.0f;
+ float amountMinimum = 1.0f / range;
float radius = range * max(radiusAmount, amountMinimum);
- float smooth = 1.0f / (range * max(smoothAmount, amountMinimum * 3.0f));
+ float smooth = 1.0f / (range * max(smoothAmount, amountMinimum * 2.0f));
// compute box
float box = roundBox(bounds * (coord * 2.0f), bounds, radius);
diff --git a/src/osd/modules/render/bgfx/shaders/chains/hlsl/fs_distortion.sc b/src/osd/modules/render/bgfx/shaders/chains/hlsl/fs_distortion.sc
index be1f6ef43f6..449294978b0 100644
--- a/src/osd/modules/render/bgfx/shaders/chains/hlsl/fs_distortion.sc
+++ b/src/osd/modules/render/bgfx/shaders/chains/hlsl/fs_distortion.sc
@@ -105,7 +105,7 @@ float GetRoundCornerFactor(vec2 coord, vec2 bounds, float radiusAmount, float sm
float range = min(bounds.x, bounds.y);
float amountMinimum = range > 0.0f ? 1.0f / range : 0.0f;
float radius = range * max(radiusAmount, amountMinimum);
- float smooth_val = 1.0f / (range * max(smoothAmount, amountMinimum * 3.0f));
+ float smooth_val = 1.0f / (range * max(smoothAmount, amountMinimum * 2.0f));
// compute box
float box = roundBox(bounds * (coord * 2.0f), bounds, radius);
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 9d5b99d0546..a0d6f56772a 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
@@ -155,7 +155,7 @@ void main()
ScanCoord *= u_source_dims.y * u_scanline_scale.x * 3.1415927; // PI
- float ScanCoordJitter = u_scanline_jitter.x * u_jitter_amount.x * 1.618034; // PHI
+ float ScanCoordJitter = u_scanline_jitter.x * u_jitter_amount.x * 1.5707963; // half PI
float ScanSine = sin(ScanCoord + ScanCoordJitter);
float ScanlineWide = u_scanline_height.x + u_scanline_variation.x * max(1.0, u_scanline_height.x) * (1.0 - ColorBrightness);
float ScanSineScaled = pow(ScanSine * ScanSine, ScanlineWide);