12345678910111213141516171819202122232425262728293031323334353637383940 |
- // Upgrade NOTE: replaced 'mul(UNITY_MATRIX_MVP,*)' with 'UnityObjectToClipPos(*)'
- Shader "Custom/VertexColor" {
- SubShader {
- Pass {
- LOD 200
-
-
- CGPROGRAM
- #pragma vertex vert
- #pragma fragment frag
-
- struct VertexInput {
- float4 v : POSITION;
- float4 color: COLOR;
- };
-
- struct VertexOutput {
- float4 pos : SV_POSITION;
- float4 col : COLOR;
- };
-
- VertexOutput vert(VertexInput v) {
-
- VertexOutput o;
- o.pos = UnityObjectToClipPos(v.v);
- o.col = v.color;
-
- return o;
- }
-
- float4 frag(VertexOutput o) : COLOR {
- return o.col;
- }
-
- ENDCG
- }
- }
-
- }
|