Skip to content

Commit 712dfa5

Browse files
committed
Update cDLAA.fx
1 parent 0f59ab9 commit 712dfa5

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

shaders/cDLAA.fx

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,18 @@ uniform int _RenderMode <
1313
ui_items = "Render Image\0Render Mask\0";
1414
> = 0;
1515

16+
uniform int _ContrastThreshold <
17+
ui_label = "Long Edge Threshold";
18+
ui_tooltip = "The minimum amount of noise required to detect long edges.";
19+
ui_type = "combo";
20+
ui_items = "Very High\0High\0Medium\0Low\0Very Low\0";
21+
> = 1;
22+
23+
static const float ContrastThresholds[5] =
24+
{
25+
1.0 / 3.0, 1.0 / 4.0, 1.0 / 6.0, 1.0 / 8.0, 1.0 / 16.0
26+
};
27+
1628
#include "shared/cShade.fxh"
1729
#include "shared/cColor.fxh"
1830
#include "shared/cBlend.fxh"
@@ -139,7 +151,7 @@ float4 PS_AntiAliasing(CShade_VS2PS_Quad Input) : SV_TARGET0
139151
float LongEdgeMaskV = saturate((LongBlurV.a * 2.0) - 1.0);
140152

141153
[branch]
142-
if (abs(LongEdgeMaskH - LongEdgeMaskV) > 0.25)
154+
if (abs(LongEdgeMaskH - LongEdgeMaskV) > ContrastThresholds[ContrastThresholds])
143155
{
144156
float LongBlurLumaH = GetIntensity(LongBlurH.rgb);
145157
float LongBlurLumaV = GetIntensity(LongBlurV.rgb);

0 commit comments

Comments
 (0)