Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Shader "Custom/VertexColorUnlit" {
- Category {
- Tags { "RenderType"="Opaque" }
- Lighting Off
- SubShader {
- Pass {
- CGPROGRAM
- #pragma vertex vert
- #pragma fragment frag
- #include "UnityCG.cginc"
- struct appdata_t {
- float4 vertex : POSITION;
- fixed4 color : COLOR;
- };
- struct v2f {
- float4 vertex : SV_POSITION;
- fixed4 color : COLOR;
- };
- v2f vert (appdata_t v)
- {
- v2f o;
- o.vertex = mul(UNITY_MATRIX_MVP, v.vertex);
- o.color = v.color;
- return o;
- }
- fixed4 frag (v2f i) : SV_Target
- {
- return i.color;
- }
- ENDCG
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement