Advertisement
Guest User

Untitled

a guest
Aug 30th, 2015
68
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.88 KB | None | 0 0
  1. Shader "Custom/Vertex Color Unlit" {
  2. Properties {
  3. }
  4. SubShader {
  5. Pass {
  6. Lighting Off
  7.  
  8. CGPROGRAM
  9. #pragma vertex vert
  10. #pragma fragment frag
  11.  
  12. struct vertexInput {
  13. half4 vertex : POSITION;
  14. half4 color : COLOR;
  15. };
  16.  
  17. struct vertexOutput{
  18. half4 pos : SV_POSITION;
  19. half4 color : COLOR;
  20. };
  21.  
  22. vertexOutput vert(vertexInput input) {
  23.  
  24. vertexOutput output;
  25. output.pos = mul(UNITY_MATRIX_MVP, input.vertex);
  26. output.color = input.color;
  27. return output;
  28. }
  29.  
  30. float4 frag(vertexOutput input) : COLOR {
  31. return input.color;
  32. }
  33.  
  34. ENDCG
  35. }
  36. }
  37. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement