From 3470d85246d35461cb373c0d4270022d41d59829 Mon Sep 17 00:00:00 2001 From: chrisgregan Date: Fri, 20 Mar 2015 16:54:16 +0000 Subject: [PATCH] Portrait images are getting clipped #88 Fixed by copying the vertex shader code from the standard Unity sprite shader. --- Assets/Fungus/Portrait/Resources/Crossfade.shader | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/Assets/Fungus/Portrait/Resources/Crossfade.shader b/Assets/Fungus/Portrait/Resources/Crossfade.shader index dec7658d..dba71b55 100644 --- a/Assets/Fungus/Portrait/Resources/Crossfade.shader +++ b/Assets/Fungus/Portrait/Resources/Crossfade.shader @@ -62,11 +62,15 @@ v2f vert(appdata_t IN) { - v2f OUT; - OUT.vertex = mul(UNITY_MATRIX_MVP, IN.vertex); - OUT.texcoord = TRANSFORM_TEX(IN.texcoord, _MainTex); - OUT.color = IN.color * _Color; - return OUT; + v2f OUT; + OUT.vertex = mul(UNITY_MATRIX_MVP, IN.vertex); + OUT.texcoord = IN.texcoord; + OUT.color = IN.color * _Color; + #ifdef PIXELSNAP_ON + OUT.vertex = UnityPixelSnap (OUT.vertex); + #endif + + return OUT; } fixed4 frag (v2f i) : COLOR