// Shadow pass Pass { Name ${VFXPassShadow} Tags { "LightMode"=${VFXPassShadow} } ZClip [_ZClip] ZWrite On Blend Off HLSLPROGRAM #pragma target 4.5 #if !USE_ALPHA_TEST && IS_TRANSPARENT_PARTICLE #define USE_ALPHA_TEST 1 #endif struct ps_input { float4 pos : SV_POSITION; #if USE_ALPHA_TEST || VFX_USE_ALPHA_CURRENT nointerpolation float2 builtInInterpolants : TEXCOORD0; #endif float pointSize : PSIZE; UNITY_VERTEX_OUTPUT_STEREO VFX_VERTEX_OUTPUT_INSTANCE_INDEX }; #define VFX_VARYING_PS_INPUTS ps_input #define VFX_VARYING_POSCS pos #define VFX_VARYING_ALPHA builtInInterpolants.x #define VFX_VARYING_ALPHATHRESHOLD builtInInterpolants.y ${VFXBegin:VFXVertexAdditionalProcess} float3 posWS = TransformPositionVFXToWorld(vPos); VFXApplyShadowBias(o.VFX_VARYING_POSCS, posWS); ${VFXEnd} ${VFXPassShadowDefine} ${VFXInclude("Shaders/ParticlePoints/Pass.template")} #pragma fragment frag float frag(ps_input i) : SV_TARGET { UNITY_SETUP_STEREO_EYE_INDEX_POST_VERTEX(i); VFXTransformPSInputs(i); float alpha = VFXGetFragmentColor(i).a; VFXClipFragmentColor(alpha,i); return 0; } ENDHLSL }