From f1da2ecffa66ffa0162be5a74f4609fecdf35882 Mon Sep 17 00:00:00 2001 From: "Westley M. Martinez" Date: Fri, 30 Dec 2016 10:46:44 -0800 Subject: Remove phosphor burn-in. --- hlsl/phosphor.fx | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/hlsl/phosphor.fx b/hlsl/phosphor.fx index 874d67dfded..488b1d37dca 100644 --- a/hlsl/phosphor.fx +++ b/hlsl/phosphor.fx @@ -132,6 +132,13 @@ float4 ps_main(PS_INPUT Input) : COLOR if (b != 0.0f) b = pow(Gamma.b * DeltaTime + pow(1 / b, 1 / Beta.b), -Beta.b); } + // Prevent burn-in + if (DeltaTime > 0.0f) { + float threshold = 0.5f / 255.0f; // Half-color increment + r = max(0.0f, r - threshold); + g = max(0.0f, g - threshold); + b = max(0.0f, b - threshold); + } float RedMax = max(CurrPix.r, r); float GreenMax = max(CurrPix.g, g); float BlueMax = max(CurrPix.b, b); -- cgit v1.2.3