41 lines
809 B
Text
41 lines
809 B
Text
|
Shader "_Custom/Utility_ZWrite" {
|
||
|
Properties {
|
||
|
}
|
||
|
SubShader {
|
||
|
LOD 100
|
||
|
Tags { "IGNOREPROJECTOR" = "true" "QUEUE" = "Transparent" "RenderType" = "Transparent" }
|
||
|
Pass {
|
||
|
LOD 100
|
||
|
Tags { "IGNOREPROJECTOR" = "true" "QUEUE" = "Transparent" "RenderType" = "Transparent" }
|
||
|
ColorMask 0
|
||
|
Cull Off
|
||
|
Fog {
|
||
|
Mode Off
|
||
|
}
|
||
|
CGPROGRAM
|
||
|
#pragma vertex vert
|
||
|
#pragma fragment frag
|
||
|
#include "UnityCG.cginc"
|
||
|
struct appdata {
|
||
|
fixed4 color : COLOR;
|
||
|
float4 vertex : POSITION;
|
||
|
};
|
||
|
struct v2f {
|
||
|
fixed4 color : COLOR;
|
||
|
float4 vertex : SV_POSITION;
|
||
|
};
|
||
|
v2f vert(appdata v)
|
||
|
{
|
||
|
v2f o;
|
||
|
o.color = clamp(v.color, 0.0, 1.0);
|
||
|
o.vertex = UnityObjectToClipPos(v.vertex);
|
||
|
return o;
|
||
|
}
|
||
|
fixed4 frag(v2f i) : SV_Target
|
||
|
{
|
||
|
return i.color;
|
||
|
}
|
||
|
ENDCG
|
||
|
}
|
||
|
}
|
||
|
}
|