Created
November 1, 2016 03:09
-
-
Save keijiro/ad668fc2f48b2da140f81e2ba7fd9074 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
fixed4 frag(v2f IN) : SV_Target | |
{ | |
half2 uv = IN.texcoord.xy; | |
fixed4 c = tex2D(_MainTex, uv) * IN.color; | |
half a1 = atan2(uv.x - 0.5, 0.5 - uv.y); | |
half a2 = atan2(ddx(uv.y), ddx(uv.x)); | |
c.rgb = max((a1 < a2) * c.r, c.g); | |
return c; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment