Skip to content

Commit

Permalink
Fix strange alpha behaviour in Cutout mode.
Browse files Browse the repository at this point in the history
  • Loading branch information
emilianavt committed Jul 7, 2020
1 parent 4ee8bb0 commit 319ba2e
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions MToon/Resources/Shaders/MToonCore.cginc
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,7 @@ float4 frag_forward(v2f i) : SV_TARGET
alpha = _Color.a * mainTex.a;
alpha = (alpha - _Cutoff) / max(fwidth(alpha), EPS_COL) + 0.5; // Alpha to Coverage
clip(alpha - _Cutoff);
alpha = 1.0; // Discarded, otherwise it should be assumed to have full opacity
#endif
#ifdef _ALPHABLEND_ON
alpha = _Color.a * mainTex.a;
Expand Down

0 comments on commit 319ba2e

Please sign in to comment.