From 773e35d79ba2919d8538fe6b41de2a2df77d2071 Mon Sep 17 00:00:00 2001 From: Ryan Holtz Date: Mon, 30 May 2011 21:40:25 +0000 Subject: 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. --- hlsl/color.fx | 3 --- hlsl/post.fx | 7 +++++++ 2 files changed, 7 insertions(+), 3 deletions(-) (limited to 'hlsl') diff --git a/hlsl/color.fx b/hlsl/color.fx index 5f12ed95c19..e4aa954e8b5 100644 --- a/hlsl/color.fx +++ b/hlsl/color.fx @@ -130,9 +130,6 @@ float4 ps_main(PS_INPUT Input) : COLOR OutRGB.g = pow(Saturated.g, GrnPower); OutRGB.b = pow(Saturated.b, BluPower); - // -- Color Compression (increasing the floor of the signal without affecting the ceiling) -- - OutRGB = float3(RedFloor + (1.0f - RedFloor) * OutRGB.r, GrnFloor + (1.0f - GrnFloor) * OutRGB.g, BluFloor + (1.0f - BluFloor) * OutRGB.b); - return float4(OutRGB, BaseTexel.a); } 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); -- cgit v1.2.3