Skip to content

Commit

Permalink
Update cContrastNormalization.fx
Browse files Browse the repository at this point in the history
  • Loading branch information
papadanku committed Jul 30, 2024
1 parent e2fc6a6 commit 1d40154
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions shaders/cContrastNormalization.fx
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@

#include "shared/cShade.fxh"
#include "shared/cColor.fxh"
#include "shared/cMath.fxh"

uniform int _Select <
Expand Down Expand Up @@ -74,10 +75,10 @@ float4 PS_ContrastNormalization(CShade_VS2PS_Quad Input) : SV_TARGET0
{
case 0:
float4 LCN = GetLocalContrastNormalization(CShade_SampleColorTex, Input.Tex0);
return (dot(LCN.rgb, 1.0 / 3.0) * 0.5) + 0.5;
return (CColor_GetLuma(LCN.rgb, 0) * 0.5) + 0.5;
case 1:
float4 CT = GetCensusTransform(CShade_SampleColorTex, Input.Tex0);
return dot(CT.rgb, 1.0 / 3.0);
return CColor_GetLuma(CT.rgb, 0);
default:
return 0.5;
}
Expand Down

0 comments on commit 1d40154

Please sign in to comment.