Skip to content

Commit

Permalink
fix #41; Doesn't work with Screen-Space Overlay on Mac editor
Browse files Browse the repository at this point in the history
  • Loading branch information
mob-sakai committed Mar 15, 2019
1 parent 90000ef commit 76cb912
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions SoftMask.cginc
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ fixed Approximately(float4x4 a, float4x4 b)
return step(
max(d._m00,max(d._m01,max(d._m02,max(d._m03,
max(d._m10,max(d._m11,max(d._m12,max(d._m13,
max(d._m20,max(d._m21,max(d._m22,max(d._m23,
max(d._m30,max(d._m31,max(d._m32,d._m33))))))))))))))),
max(d._m20,max(d._m21,max(d._m22,//max(d._m23,
max(d._m30,max(d._m31,max(d._m32,d._m33)))))))))))))),
0.01);
}

Expand All @@ -40,7 +40,7 @@ float SoftMaskInternal(float4 clipPos)
view.y = lerp(view.y, 1 - view.y, step(0, _ProjectionParams.x));
#endif
#elif UNITY_UV_STARTS_AT_TOP
view.y = 1.0 - view.y;
view.y = lerp(view.y, 1 - view.y, step(0, _ProjectionParams.x));
#endif

fixed4 mask = tex2D(_SoftMaskTex, view);
Expand Down

0 comments on commit 76cb912

Please sign in to comment.