// Made with Amplify Shader Editor
// Available at the Unity Asset Store - http://u3d.as/y3X 
Shader "URP/Effects/Particle/Test/Golw"
{
	Properties
	{
		_MainTex("MainTex", 2D) = "white" {}
		[HDR]_Color0("Color 0", Color) = (2,2,2,0.003921569)
		//[HideInInspector] _texcoord( "", 2D ) = "white" {}
		//[HideInInspector] __dirty( "", Int ) = 1
	}

	SubShader
	{
		Pass
		{

		 Tags{
		"RenderType" = "Transparent" 
		"IgnoreProjector" = "True" 
		//"RenderPipeline" = "UniversalPipeline"
		"IgnoreProjector" = "True"
		"Queue" = "Transparent"
		}
		 Blend SrcAlpha OneMinusSrcAlpha
		Cull Off
		ZWrite Off
		//ZTest Off
		//BlendOp Max
		//Blend One One
		//ZWrite off
		//ZClip True
		ColorMask RGB

		CGPROGRAM

		#pragma vertex vert
		#pragma fragment frag
		#include "UnityCG.cginc"

		#pragma multi_compile_instancing

			/*
		#pragma shader_feature _ _ALPHAPREMULTIPLY_ON _ALPHAMODULATE_ON
		#pragma shader_feature _ALPHATEST_ON
		#pragma shader_feature _ _COLOROVERLAY_ON _COLORCOLOR_ON _COLORADDSUBDIFF_ON
		#pragma shader_feature _FLIPBOOKBLENDING_ON
		#pragma shader_feature _SOFTPARTICLES_ON
		#pragma shader_feature _FADING_ON
		#pragma shader_feature _DISTORTION_ON
		*/
		/**
		#include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Common.hlsl" 
		#include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/UnityInput.hlsl"
		#include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Lighting.hlsl"
		#include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/ShaderGraphFunctions.hlsl"
		*/
			//#pragma surface surf Unlit alpha:fade keepalpha noshadow 

			struct Attributes
			{
				float4 positionOS   : POSITION;
				float2 texcoord     : TEXCOORD0;
				UNITY_VERTEX_INPUT_INSTANCE_ID
			};

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

			//CBUFFER_START(UnityPerMaterial)
			float4 _Color0;
			sampler2D _MainTex;
			float4 _MainTex_ST;
			//CBUFFER_END

			v2f vert(Attributes v)
			{
				v2f o;
				UNITY_SETUP_INSTANCE_ID(v);
				UNITY_TRANSFER_INSTANCE_ID(v, o);
				UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(o);

				o.uv = TRANSFORM_TEX(v.texcoord, _MainTex);

				//VertexPositionInputs vertexInput = GetVertexPositionInputs(v.positionOS.xyz);
				//o.vertex = vertexInput.positionCS;

				o.vertex = UnityObjectToClipPos(v.positionOS);
				return o;
			}

			float4 frag(v2f i) : SV_Target
			{
				UNITY_SETUP_INSTANCE_ID(i);
				UNITY_SETUP_STEREO_EYE_INDEX_POST_VERTEX(i);
				//float2 uv_MainTex = i.uv_texcoord * _MainTex_ST.xy + _MainTex_ST.zw;
				float4 col = tex2D(_MainTex, i.uv) * _Color0;
				//col.a = 0;
				return col;
			}
			ENDCG
		}
	}
}
