Shader "Custom/URP_Additive" { Properties { _MainTex ("Base", 2D) = "white" {} _TintColor ("TintColor", Color) = (1.0, 1.0, 1.0, 1.0) } SubShader { Tags { "RenderType" = "Transparent" "Queue" = "Transparent" } LOD 100 Cull Off ZWrite Off Blend One One Pass { Name "FORWARD" Tags { "LightMode" = "UniversalForward" } HLSLPROGRAM #pragma vertex vert #pragma fragment frag #pragma multi_compile_fog #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Core.hlsl" struct Attributes { float4 positionOS : POSITION; float2 uv : TEXCOORD0; float4 color : COLOR; }; struct Varyings { float4 positionHCS : SV_POSITION; float2 uv : TEXCOORD0; float4 color : COLOR; float fogFactor : TEXCOORD1; }; CBUFFER_START(UnityPerMaterial) float4 _TintColor; CBUFFER_END TEXTURE2D(_MainTex); SAMPLER(sampler_MainTex); Varyings vert(Attributes IN) { Varyings OUT; OUT.positionHCS = TransformObjectToHClip(IN.positionOS.xyz); OUT.uv = IN.uv; OUT.color = IN.color * _TintColor; OUT.fogFactor = ComputeFogFactor(OUT.positionHCS.z / OUT.positionHCS.w); return OUT; } float4 frag(Varyings IN) : SV_Target { float4 tex = SAMPLE_TEXTURE2D(_MainTex, sampler_MainTex, IN.uv); float4 col = tex * IN.color; col.rgb = MixFog(col.rgb, IN.fogFactor); return col; } ENDHLSL } } FallBack Off }