Rasagar/Library/PackageCache/com.unity.probuilder/Content/Shader/TransparentOverlay.shader

62 lines
1.3 KiB
Plaintext
Raw Normal View History

2024-08-26 13:07:20 -07:00
Shader "Hidden/ProBuilder/TransparentOverlay"
{
Properties
{
_MainTex ("Texture", 2D) = "white" {}
}
SubShader
{
Tags { "IgnoreProjector"="True" "RenderType"="Transparent" "Queue"="Transparent" }
Lighting Off
ZTest LEqual
ZWrite On
Cull Back
Blend SrcAlpha OneMinusSrcAlpha
Pass
{
CGPROGRAM
#pragma vertex vert
#pragma fragment frag
#include "UnityCG.cginc"
sampler2D _MainTex;
struct appdata
{
float4 vertex : POSITION;
float4 color : COLOR;
float4 texcoord0 : TEXCOORD0;
};
struct v2f
{
float4 pos : SV_POSITION;
float4 color : COLOR;
float2 uv : TEXCOORD0;
};
v2f vert (appdata v)
{
v2f o;
o.pos = UnityObjectToClipPos(v.vertex);
o.uv = v.texcoord0.xy;
o.color = v.color;
return o;
}
half4 frag (v2f i) : COLOR
{
return tex2D(_MainTex, i.uv) * i.color;
}
ENDCG
}
}
}