diff options
author | 2011-05-30 21:40:25 +0000 | |
---|---|---|
committer | 2011-05-30 21:40:25 +0000 | |
commit | 773e35d79ba2919d8538fe6b41de2a2df77d2071 (patch) | |
tree | 46074dd7a92adfd83b233b56cad37e57a5813eee /hlsl/post.fx | |
parent | 796e691522ba5c47fc0610da4f557514563f85b9 (diff) |
Moved "color floor" functionality to occur after scanlines but before shadow mask. Scanlines look much better and no longer cut black lines through the shadow mask. No whatsnew.
Diffstat (limited to 'hlsl/post.fx')
-rw-r--r-- | hlsl/post.fx | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/hlsl/post.fx b/hlsl/post.fx index 69ececd4249..d55e6a14ced 100644 --- a/hlsl/post.fx +++ b/hlsl/post.fx @@ -112,6 +112,10 @@ uniform float ShadowV = 0.375f; uniform float ShadowWidth = 8.0f; uniform float ShadowHeight = 8.0f; +uniform float RedFloor = 0.0f; +uniform float GrnFloor = 0.0f; +uniform float BluFloor = 0.0f; + float4 ps_main(PS_INPUT Input) : COLOR { float2 Ratios = float2(WidthRatio, HeightRatio); @@ -160,6 +164,9 @@ float4 ps_main(PS_INPUT Input) : COLOR float3 ScanBrightness = lerp(1.0f, pow(ScanBrightMod * ScanBrightMod, ScanlineHeight) * ScanlineBrightScale + 1.0f, ScanlineAmount); float3 Scanned = BaseTexel.rgb * ScanBrightness; + // -- Color Compression (increasing the floor of the signal without affecting the ceiling) -- + Scanned = float3(RedFloor + (1.0f - RedFloor) * Scanned.r, GrnFloor + (1.0f - GrnFloor) * Scanned.g, BluFloor + (1.0f - BluFloor) * Scanned.b); + float2 ShadowDims = float2(ShadowWidth, ShadowHeight); float2 ShadowUV = float2(ShadowU, ShadowV); float2 ShadowMaskSize = float2(ShadowMaskSizeX, ShadowMaskSizeY); |