arskrald/AR-3/Assets/PlainColor.shader

43 lines
750 B
Plaintext
Raw Permalink Normal View History

2019-03-04 17:07:53 +00:00
// Upgrade NOTE: replaced 'mul(UNITY_MATRIX_MVP,*)' with 'UnityObjectToClipPos(*)'
Shader "Live/PlainColor" {
SubShader{
Tags { "RenderType" = "Opaque" }
Pass {
Cull Off
CGPROGRAM
#pragma vertex vert
#pragma fragment frag
fixed4 _Color;
struct Input {
float4 position : POSITION;
float4 color : COLOR;
};
struct VertexToFragment {
float4 position : SV_POSITION;
float4 color : COLOR;
};
VertexToFragment vert(Input IN) {
VertexToFragment OUT;
OUT.position = UnityObjectToClipPos( IN.position);
OUT.color = IN.color;
return OUT;
}
fixed4 frag(VertexToFragment IN) : SV_Target {
return IN.color;
}
ENDCG
}
}
}