Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Shader "ZTest Shaders/Cube"
- {
- Properties
- {
- ObjectColor("Object Color", Color) = (1, 1, 1, 1)
- }
- SubShader
- {
- Tags {
- "Queue" = "Transparent+10"
- }
- Pass
- {
- ZWrite On
- ZTest Greater
- CGPROGRAM
- #pragma vertex vert
- #pragma fragment frag
- #include "UnityCG.cginc"
- struct appdata
- {
- float4 vertex : POSITION;
- };
- struct v2f
- {
- fixed4 color : COLOR;
- float4 vertex : SV_POSITION;
- };
- uniform fixed4 ObjectColor;
- v2f vert (appdata v)
- {
- v2f o;
- o.vertex = UnityObjectToClipPos(v.vertex);
- o.color = ObjectColor;
- return o;
- }
- fixed4 frag (v2f i) : SV_Target
- {
- return i.color;
- }
- ENDCG
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement