Skip to content
This repository was archived by the owner on Nov 30, 2020. It is now read-only.

Commit e828f50

Browse files
committed
Fix for #26
Chaged to discard the CoC history when the sign of the CoC value is inverted.
1 parent 37bf8f1 commit e828f50

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

PostProcessing/Resources/Shaders/DepthOfField.cginc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ Output FragAntialiasCoC(VaryingsDOF i)
111111
half4 base = tex2D(_MainTex, i.uv);
112112
half hCoC = tex2D(_HistoryCoC, i.uv).r;
113113
half CoC = base.a;
114-
half nCoC = (hCoC + CoC) / 2.0; // TODO: Smarter CoC AA
114+
half nCoC = hCoC * CoC < 0.0 ? CoC : (hCoC + CoC) / 2.0; // TODO: Smarter CoC AA
115115

116116
Output output;
117117
output.base = half4(base.rgb, nCoC);

0 commit comments

Comments
 (0)