UnityGame/Assets/OutlineShader.shader
2024-10-27 10:53:47 +03:00

50 lines
1.0 KiB
Plaintext

Shader "Hidden/OutlineShader"
{
Properties
{
_OutlineColor ("Outline Color", Color) = (1,1,1,1)
}
SubShader
{
Tags { "RenderType"="Opaque" "Queue"="Transparent" }
Pass
{
Name "Outline"
Cull Off
Blend SrcAlpha OneMinusSrcAlpha
ZWrite Off
ZTest Always
HLSLPROGRAM
#pragma vertex vert
#pragma fragment frag
#include "UnityCG.cginc"
float4 _OutlineColor;
struct appdata
{
float4 vertex : POSITION;
};
struct v2f
{
float4 vertex : SV_POSITION;
};
v2f vert (appdata v)
{
v2f o;
o.vertex = UnityObjectToClipPos(v.vertex);
return o;
}
fixed4 frag (v2f i) : SV_Target
{
return _OutlineColor;
}
ENDHLSL
}
}
}