advancedskrald/ChessAR/Assets/PlainColor.shader

43 lines
750 B
Plaintext

// 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
}
}
}