Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Shader "Unlit/NoDraw"
- {
- Properties {
- _Color ("Main Color", Color) = (1,1,1,1)
- }
- SubShader
- {
- Tags { "RenderType"="Opaque" }
- LOD 100
- Pass
- {
- CGPROGRAM
- #pragma multi_compile_local __ IN_SCENE_VIEW
- #pragma vertex vert
- #pragma fragment frag
- struct appdata
- {
- float4 vertex : POSITION;
- float2 uv : TEXCOORD0;
- };
- struct v2f
- {
- float2 uv : TEXCOORD0;
- float4 vertex : SV_POSITION;
- };
- fixed4 _Color;
- v2f vert (appdata v)
- {
- v2f o;
- o.vertex = UnityObjectToClipPos(v.vertex);
- return o;
- }
- fixed4 frag (v2f i) : SV_Target
- {
- #ifdef IN_SCENE_VIEW
- discard;
- #endif
- return _Color;
- }
- ENDCG
- }
- }
- }
Add Comment
Please, Sign In to add comment