You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
71 lines
1.8 KiB
71 lines
1.8 KiB
Pass
|
|
{
|
|
Name "${VFXHDRPForwardPassName}"
|
|
Tags { "LightMode"="${VFXHDRPForwardPassName}"}
|
|
${VFXStencilForward}
|
|
|
|
HLSLPROGRAM
|
|
#pragma target 4.5
|
|
|
|
|
|
#define UNITY_MATERIAL_LIT
|
|
#define LIGHTLOOP_TILE_PASS
|
|
|
|
${VFXHDRPForwardDefines}
|
|
#pragma multi_compile USE_FPTL_LIGHTLIST USE_CLUSTERED_LIGHTLIST
|
|
#pragma multi_compile_fragment PUNCTUAL_SHADOW_LOW PUNCTUAL_SHADOW_MEDIUM PUNCTUAL_SHADOW_HIGH
|
|
#pragma multi_compile_fragment DIRECTIONAL_SHADOW_LOW DIRECTIONAL_SHADOW_MEDIUM DIRECTIONAL_SHADOW_HIGH
|
|
#pragma multi_compile_fragment AREA_SHADOW_MEDIUM AREA_SHADOW_HIGH
|
|
#pragma multi_compile_fragment PROBE_VOLUMES_OFF PROBE_VOLUMES_L1 PROBE_VOLUMES_L2
|
|
#pragma multi_compile _ DEBUG_DISPLAY
|
|
|
|
${VFXIncludeRP("VFXLitVaryings.template")}
|
|
|
|
struct ps_input
|
|
{
|
|
SV_POSITION_QUALIFIERS float4 pos : SV_POSITION;
|
|
${VFXHDRPLitDeclareVaryings}
|
|
|
|
float2 uv : TEXCOORD1;
|
|
float3 posWS : TEXCOORD2;
|
|
float4 sphereInfo : TEXCOORD3;
|
|
|
|
${VFXAdditionalInterpolantsDeclaration}
|
|
|
|
UNITY_VERTEX_OUTPUT_STEREO
|
|
};
|
|
|
|
${VFXHDRPLitVaryingsMacros}
|
|
|
|
#define VFX_VARYING_PS_INPUTS ps_input
|
|
#define VFX_VARYING_POSCS pos
|
|
#define VFX_VARYING_UV uv
|
|
#define VFX_VARYING_POSWS posWS
|
|
#define VFX_VARYING_SPHERECENTER sphereInfo.xyz
|
|
#define VFX_VARYING_SPHERERADIUS sphereInfo.w
|
|
|
|
${VFXBegin:VFXVertexAdditionalProcess}
|
|
${VFXHDRPLitFillVaryings}
|
|
${VFXEnd}
|
|
|
|
${VFXInclude("Shaders/ParticleSpheres/Pass.template")}
|
|
#define SHADERPASS SHADERPASS_FORWARD
|
|
${VFXIncludeRP("VFXLit.template")}
|
|
|
|
#pragma fragment frag
|
|
void frag(ps_input i
|
|
, out float4 outColor : SV_Target0
|
|
, out float oDepth : DEPTH_OFFSET_SEMANTIC
|
|
)
|
|
{
|
|
UNITY_SETUP_STEREO_EYE_INDEX_POST_VERTEX(i);
|
|
VFXTransformPSInputs(i);
|
|
|
|
float3 normalWS;
|
|
VFXUVData uvData = (VFXUVData)0;
|
|
VFXClipSphereAndGetDepthOffsetAndNormal(oDepth, normalWS, i);
|
|
|
|
outColor = VFXGetPixelOutputForward(i,normalWS,uvData, true);
|
|
}
|
|
ENDHLSL
|
|
}
|