52 lines
835 B
Plaintext
52 lines
835 B
Plaintext
|
// Unlit shader. Simplest possible colored shader.
|
||
|
// - no lighting
|
||
|
// - no lightmap support
|
||
|
// - no texture
|
||
|
|
||
|
Shader "Unlit/RenderLine" {
|
||
|
Properties {
|
||
|
_Color ("Main Color", Color) = (1,1,1,1)
|
||
|
}
|
||
|
|
||
|
SubShader {
|
||
|
Tags { "Queue" = "Transparent" "RenderType" = "Transparent" }
|
||
|
ZTest Off
|
||
|
Pass {
|
||
|
CGPROGRAM
|
||
|
#pragma vertex vert
|
||
|
#pragma fragment frag
|
||
|
#pragma target 2.0
|
||
|
|
||
|
#include "UnityCG.cginc"
|
||
|
|
||
|
struct appdata_t {
|
||
|
half4 color : COLOR;
|
||
|
float4 vertex : POSITION;
|
||
|
};
|
||
|
|
||
|
struct v2f {
|
||
|
float4 vertex : SV_POSITION;
|
||
|
half4 color : COLOR;
|
||
|
};
|
||
|
|
||
|
fixed4 _Color;
|
||
|
|
||
|
v2f vert (appdata_t v)
|
||
|
{
|
||
|
v2f o;
|
||
|
o.vertex = UnityObjectToClipPos(v.vertex);
|
||
|
o.color = v.color;
|
||
|
return o;
|
||
|
}
|
||
|
|
||
|
fixed4 frag (v2f i) : COLOR
|
||
|
{
|
||
|
fixed4 col = _Color*i.color;
|
||
|
return col;
|
||
|
}
|
||
|
ENDCG
|
||
|
}
|
||
|
}
|
||
|
|
||
|
}
|