CarmenSandiego/Assets/Shaders/Render Texture UI ZTest Always.shader
Jamie Greunbaum ff3449c39a - Added a UI render texture material that has standard depth sorting.
- On-set newspaper display in round 3 no longer renders over everything.
2026-04-12 15:07:05 -04:00

62 lines
1.4 KiB
Plaintext

Shader "Carmen/Render Texture UI/Always On Top"
{
Properties
{
_MainTex ("Logo Image", 2D) = "white" {}
_Color ("Colour", Color) = (1.0, 1.0, 1.0, 1.0)
}
SubShader
{
Tags { "Queue"="Overlay" "RenderType"="Transparent" "CanUseSpriteAtlas"="True" }
LOD 200
Pass {
Cull Back
Lighting Off
Blend SrcAlpha OneMinusSrcAlpha
ZWrite Off
ZTest Always
CGPROGRAM
#include "UnityCG.cginc"
#pragma target 4.5
#pragma vertex vert
#pragma fragment frag
UNITY_DECLARE_TEX2D(_MainTex);
float4 _MainTex_ST;
half4 _Color;
struct Data
{
float4 vertex : POSITION;
float2 uv : TEXCOORD0;
};
struct V2F
{
float4 position : SV_POSITION;
float2 uv : TEXCOORD0;
};
V2F vert(Data v)
{
V2F o;
o.position = UnityObjectToClipPos(v.vertex);
o.uv = TRANSFORM_TEX(v.uv, _MainTex);
return o;
}
fixed4 frag(V2F i) : SV_TARGET
{
return UNITY_SAMPLE_TEX2D(_MainTex, i.uv) * _Color;
}
ENDCG
}
}
FallBack "Diffuse"
}