summaryrefslogtreecommitdiffstatshomepage
path: root/hlsl/post.fx
diff options
context:
space:
mode:
author ImJezze <jezze@gmx.net>2016-03-15 22:15:25 +0100
committer ImJezze <jezze@gmx.net>2016-03-15 22:15:25 +0100
commitb507dbb5fcab52d60def45013e909249b6620349 (patch)
tree55129891751a1fee1bb365732dbba4de3fa2969e /hlsl/post.fx
parent4de23e76248e82ec43b09ea43d2c2d711d68ea09 (diff)
Scanline Variation
- added option for scanline variation
Diffstat (limited to 'hlsl/post.fx')
-rw-r--r--hlsl/post.fx7
1 files changed, 4 insertions, 3 deletions
diff --git a/hlsl/post.fx b/hlsl/post.fx
index 0bf2fcdc7f5..c3966257c02 100644
--- a/hlsl/post.fx
+++ b/hlsl/post.fx
@@ -125,10 +125,11 @@ uniform float2 ScreenOffset = float2(0.0f, 0.0f);
uniform float ScanlineAlpha = 0.0f;
uniform float ScanlineScale = 1.0f;
+uniform float ScanlineHeight = 1.0f;
+uniform float ScanlineVariation = 1.0f;
+uniform float ScanlineOffset = 1.0f;
uniform float ScanlineBrightScale = 1.0f;
uniform float ScanlineBrightOffset = 1.0f;
-uniform float ScanlineOffset = 1.0f;
-uniform float ScanlineHeight = 1.0f;
uniform float3 BackColor = float3(0.0f, 0.0f, 0.0f);
@@ -262,7 +263,7 @@ float4 ps_main(PS_INPUT Input) : COLOR
float ScanlineCoord = SourceCoord.y * SourceDims.y * ScanlineScale * PI;
float ScanlineCoordJitter = ScanlineOffset * PHI;
float ScanlineSine = sin(ScanlineCoord + ScanlineCoordJitter);
- float ScanlineWide = ScanlineHeight + max(1.0f, ScanlineHeight) * (1.0f - ColorBrightness);
+ float ScanlineWide = ScanlineHeight + ScanlineVariation * max(1.0f, ScanlineHeight) * (1.0f - ColorBrightness);
float ScanlineAmount = pow(ScanlineSine * ScanlineSine, ScanlineWide);
float ScanlineBrightness = ScanlineAmount * BrightnessScale + BrightnessOffset * BrightnessScale;