Advertisement
Guest User

Untitled

a guest
Nov 26th, 2014
149
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.82 KB | None | 0 0
  1. Shader "Custom/MostBasic" {
  2.     Properties {
  3.         _Color ("Main Color", COLOR) = (1, 1, 1, 1)
  4.     }
  5.     SubShader {
  6.         Tags { "RenderType"="Opaque" }
  7.         LOD 200
  8.        
  9.         Pass{
  10.             CGPROGRAM
  11.             #pragma vertex vert
  12.             #pragma fragment frag
  13.  
  14.             uniform fixed4 _Color;
  15.            
  16.             struct vertexInput {
  17.                 float4 vertex : POSITION;
  18.                 float4 tex : TEXCOORD0;                        
  19.                 float4 color : color;
  20.             };
  21.  
  22.             struct vertexOutput {
  23.                 float4 pos : SV_POSITION;              
  24.             };
  25.  
  26.             vertexOutput vert(vertexInput v)
  27.             {
  28.                 vertexOutput o;                        
  29.                                
  30.                 o.pos = mul(UNITY_MATRIX_MVP, v.vertex);                              
  31.                                    
  32.                 return o;
  33.             }
  34.  
  35.             float4 frag(vertexOutput IN) : COLOR
  36.             {              
  37.                 return _Color;
  38.             }
  39.             ENDCG
  40.         }
  41.     }
  42.     FallBack "Diffuse"
  43. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement