Advertisement
Guest User

Vertex Color Shader

a guest
Oct 9th, 2013
135
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.58 KB | None | 0 0
  1. Shader "Custom/RGBVertsAndDiffuse" {
  2. Properties {
  3. _MainTex ("Base (RGB)", 2D) = "white" {}
  4. }
  5. SubShader {
  6. Tags { "RenderType"="Opaque" }
  7. LOD 200
  8.  
  9. CGPROGRAM
  10. #pragma surface surf Lambert
  11.  
  12. sampler2D _MainTex;
  13. struct Input {
  14. float2 uv_MainTex;
  15. float4 color : COLOR;
  16. };
  17. void vert(inout appdata_full v)
  18. {
  19. //v.color. = 1-( pow((1-v.color.a)*1, 1 ) );
  20. }
  21. void surf (Input IN, inout SurfaceOutput o) {
  22. half4 c = tex2D (_MainTex, IN.uv_MainTex);
  23. o.Albedo = c.rgb * IN.color.rgb;
  24. o.Alpha = c.a;
  25. }
  26. ENDCG
  27. }
  28. FallBack "Diffuse"
  29. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement