You cannot select more than 25 topics
			Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
		
		
		
		
		
			
		
			
	
	
		
			48 lines
		
	
	
		
			1.1 KiB
		
	
	
	
		
			Plaintext
		
	
		
		
			
		
	
	
			48 lines
		
	
	
		
			1.1 KiB
		
	
	
	
		
			Plaintext
		
	
| 
								 
											2 years ago
										 
									 | 
							
								Shader "AllIn1Vfx/Others/ZWriteGpuInstancing"
							 | 
						||
| 
								 | 
							
								{
							 | 
						||
| 
								 | 
							
								    Properties
							 | 
						||
| 
								 | 
							
								    {
							 | 
						||
| 
								 | 
							
								    }
							 | 
						||
| 
								 | 
							
								    SubShader
							 | 
						||
| 
								 | 
							
								    {
							 | 
						||
| 
								 | 
							
								        Tags { "RenderType"="Opaque" "RenderQueue"="Geometry+1"}
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								        Pass
							 | 
						||
| 
								 | 
							
								        {
							 | 
						||
| 
								 | 
							
								            Zwrite On
							 | 
						||
| 
								 | 
							
								            Offset 0, 1
							 | 
						||
| 
								 | 
							
								            ColorMask Off
							 | 
						||
| 
								 | 
							
								            
							 | 
						||
| 
								 | 
							
								            CGPROGRAM
							 | 
						||
| 
								 | 
							
								            #pragma vertex vert
							 | 
						||
| 
								 | 
							
								            #pragma fragment frag
							 | 
						||
| 
								 | 
							
								            #pragma multi_compile_instancing
							 | 
						||
| 
								 | 
							
								            #include "UnityCG.cginc"
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								            struct appdata
							 | 
						||
| 
								 | 
							
								            {
							 | 
						||
| 
								 | 
							
								                float4 vertex : POSITION;
							 | 
						||
| 
								 | 
							
								                UNITY_VERTEX_INPUT_INSTANCE_ID
							 | 
						||
| 
								 | 
							
								            };
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								            struct v2f
							 | 
						||
| 
								 | 
							
								            {
							 | 
						||
| 
								 | 
							
								                float4 vertex : SV_POSITION;
							 | 
						||
| 
								 | 
							
								            };
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								            v2f vert (appdata v)
							 | 
						||
| 
								 | 
							
								            {
							 | 
						||
| 
								 | 
							
								                v2f o;
							 | 
						||
| 
								 | 
							
								                UNITY_SETUP_INSTANCE_ID(v);
							 | 
						||
| 
								 | 
							
								                o.vertex = UnityObjectToClipPos(v.vertex);
							 | 
						||
| 
								 | 
							
								                return o;
							 | 
						||
| 
								 | 
							
								            }
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								            fixed4 frag (v2f i) : SV_Target
							 | 
						||
| 
								 | 
							
								            {
							 | 
						||
| 
								 | 
							
								                return  1;
							 | 
						||
| 
								 | 
							
								            }
							 | 
						||
| 
								 | 
							
								            ENDCG
							 | 
						||
| 
								 | 
							
								        }
							 | 
						||
| 
								 | 
							
								    }
							 | 
						||
| 
								 | 
							
								}
							 |