Skip to content

Commit

Permalink
Refactor ToonRPFXAAHighQuality.hlsl
Browse files Browse the repository at this point in the history
  • Loading branch information
Delt06 committed Jun 9, 2023
1 parent b344e8e commit a60078a
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ LuminanceNeighborhood GetLuminanceNeighborhood(float2 uv)
return luminance;
}

bool CanSkipFXAA(in LuminanceNeighborhood luminance)
bool CanSkipFxaa(const in LuminanceNeighborhood luminance)
{
return luminance.range < max(_FXAA_FixedContrastThreshold, _FXAA_RelativeContrastThreshold * luminance.highest);
}
Expand Down Expand Up @@ -225,7 +225,8 @@ float3 ApplyFxaa(const float2 uv)
{
const LuminanceNeighborhood luminance = GetLuminanceNeighborhood(uv);

if (CanSkipFXAA(luminance))
UNITY_BRANCH
if (CanSkipFxaa(luminance))
{
return SampleSource(uv);
}
Expand Down

0 comments on commit a60078a

Please sign in to comment.