Skip to content

Commit

Permalink
Merge pull request #98 from emilianavt/master
Browse files Browse the repository at this point in the history
Fix strange alpha behaviour in Cutout mode.
  • Loading branch information
Santarh authored Jul 7, 2020
2 parents 4ee8bb0 + 319ba2e commit 79569d5
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 79569d5

Please sign in to comment.