Shader "PleasureArcade/ClearBufferShader"
{
    Properties
    {
    }
    SubShader
    {
        Tags { "RenderType"="Transparent" "Queue"="Transparent+10" "VRCFallback"="Hidden"}
        LOD 100

        Pass
        {
			Cull Off
			ZTest Always
			ZWrite Off
			ColorMask A

            CGPROGRAM
            #pragma vertex vert
            #pragma fragment frag

            struct appdata
            {
                float4 vertex : POSITION;
                float2 uv : TEXCOORD0;
            };

            struct v2f
            {
                float2 uv : TEXCOORD0;
                float4 vertex : SV_POSITION;
            };

            v2f vert (appdata v)
            {
                v2f o;
                o.vertex = float4(v.uv.x * 2 - 1, 1 - v.uv.y * 2, 0, 1);
                o.uv = v.uv;
                return o;
            }

            fixed4 frag (v2f i) : SV_Target
            {
				// ColorMask A => reset alpha to 0 everywhere
				// This should keep transparent mirrors from breaking
                return fixed4(1, 1, 1, 0);
            }
            ENDCG
        }
    }
}
