VD-Diffuse.shader 704 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. Shader "VD Vertex Color/Diffuse" {
  2. Properties {
  3. _Color ("Main Color", Color) = (1,1,1,1)
  4. _MainTex ("Base (RGB)", 2D) = "white" {}
  5. }
  6. SubShader {
  7. Tags { "RenderType"="Opaque" }
  8. LOD 200
  9. CGPROGRAM
  10. #pragma surface surf Lambert vertex:vert
  11. sampler2D _MainTex;
  12. half4 _Color;
  13. struct Input {
  14. half2 uv_MainTex;
  15. half4 color;
  16. };
  17. void vert (inout appdata_full v, out Input o) {
  18. UNITY_INITIALIZE_OUTPUT(Input,o);
  19. o.color = v.color * _Color;
  20. }
  21. void surf (Input IN, inout SurfaceOutput o) {
  22. half4 t = tex2D(_MainTex, IN.uv_MainTex);
  23. o.Albedo = t.rgb * IN.color.rgb;
  24. o.Alpha = t.a;
  25. }
  26. ENDCG
  27. }
  28. Fallback "VertexLit"
  29. }