Guest User

Shader Vertex Color

a guest
Jul 26th, 2015
298
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.48 KB | None | 0 0
  1. Shader "Custom/VertexColorDiffuse" {
  2.     Properties {
  3.         //_MainTex ("Base (RGB)", 2D) = "white" {}
  4.     }
  5.     SubShader {
  6.         Tags { "RenderType"="Opaque" "Queue"="Geometry" }
  7.         LOD 200
  8.        
  9.         CGPROGRAM
  10.         #pragma surface surf Lambert
  11.  
  12.         //sampler2D _MainTex;
  13.  
  14.         struct Input {
  15.             //float2 uv_MainTex;
  16.             float4 color: Color; // Vertex color
  17.         };
  18.  
  19.         void surf (Input IN, inout SurfaceOutput o) {
  20.             o.Albedo = IN.color.rgb;
  21.             //o.Alpha = 1;
  22.         }
  23.         ENDCG
  24.     }
  25.     FallBack "Diffuse"
  26. }
Advertisement
Add Comment
Please, Sign In to add comment