Advertisement
netgrind

Unlit Ping Pong

Jun 9th, 2015
240
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.64 KB | None | 0 0
  1. //by cale bradbury - netgrind.net
  2. //share and shit, don't remove these comments
  3. Shader "Unlit/Ping Pong" {
  4.     Properties {
  5.         _MainTex ("Albedo (RGB)", 2D) = "white" {}
  6.     }
  7.     Category{
  8.         Blend SrcAlpha OneMinusSrcAlpha
  9.         AlphaTest Greater 0
  10.         Tags {"Queue"="Transparent"}
  11.         SubShader {
  12.             Pass{
  13.                 CGPROGRAM
  14.                 #include "UnityCG.cginc"
  15.                 #pragma vertex vert_img
  16.                 #pragma fragment frag
  17.                 sampler2D _MainTex;
  18.                 float4 _MainTex_ST;
  19.  
  20.                 fixed4 frag (v2f_img i) : COLOR{
  21.                     return tex2D(_MainTex,abs(fmod(i.uv*_MainTex_ST.xy+_MainTex_ST.zw,float2(2.0,2.0))-float2(1.0,1.0)));
  22.                 }
  23.                 ENDCG
  24.             }
  25.         }
  26.     }
  27.     FallBack "Unlit"
  28. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement