Guest User

SimpleCustomRenderTexture

a guest
Jun 11th, 2020
539
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. Shader "CustomRenderTexture/Simple"
  2. {
  3.     Properties
  4.     {
  5.         _Color("Color", Color) = (1,1,1,1)
  6.         _Tex("InputTex", 2D) = "white" {}
  7.     }
  8.  
  9.         SubShader
  10.     {
  11.        Lighting Off
  12.        Blend One Zero
  13.  
  14.        Pass
  15.        {
  16.            CGPROGRAM
  17.            #include "UnityCustomRenderTexture.cginc"
  18.            #pragma vertex CustomRenderTextureVertexShader
  19.            #pragma fragment frag
  20.            #pragma target 3.0
  21.  
  22.            float4 _Color;
  23.            sampler2D _Tex;
  24.  
  25.            float4 frag(v2f_customrendertexture IN) : COLOR
  26.            {
  27.                return _Color * tex2D(_Tex, IN.localTexcoord.xy);
  28.            }
  29.            ENDCG
  30.         }
  31.     }
  32. }
Add Comment
Please, Sign In to add comment