fix flipped soft mask texture on android

pull/87/head
Johannes Deml 2019-01-11 13:31:44 +01:00 committed by mob-sakai
parent 6df5454963
commit cc6a74cc39
1 changed files with 4 additions and 0 deletions

View File

@ -22,6 +22,10 @@ fixed Approximately(float4x4 a, float4x4 b)
half SoftMask(float4 clipPos)
{
half2 view = clipPos.xy/_ScreenParams.xy;
#if UNITY_UV_STARTS_AT_TOP
view.y = 1.0 - view.y;
#endif
half alpha =
lerp(1, tex2D(_SoftMaskTex, view).a, step(15, _Stencil))
* lerp(1, tex2D(_SoftMaskTex, view).b, step(7, _Stencil))