Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Shader "Hole" {
- Properties {
- _MainTex ("Base (RGB)", 2D) = "white" {}
- _LeftEye ("Left Eye",Vector) = (0,0,0,0)
- _LeftOval("Left Eye Oval", float)= 1
- }
- Category {
- Blend SrcAlpha OneMinusSrcAlpha
- Tags {Queue = Transparent}
- SubShader {
- Pass{
- CGPROGRAM
- #pragma vertex vert_img
- #pragma fragment frag
- #pragma target 3.0
- #include "UnityCG.cginc"
- sampler2D _MainTex;
- float4 _LeftEye;
- float _LeftOval;
- float4 frag(v2f_img i) : COLOR {
- float4 c = tex2D (_MainTex, i.uv);//samples the texture
- c.a = clamp(distance(float2(i.uv.x,(_LeftEye.y-i.uv.y)*_LeftOval+i.uv.y), _LeftEye)*_LeftEye.z+_LeftEye.w,0,1);
- return c;
- }
- ENDCG
- }
- }
- }
- FallBack "Diffuse"
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement