forked from BilalY/Rasagar
55 lines
1.6 KiB
Plaintext
55 lines
1.6 KiB
Plaintext
#pragma target 4.5
|
|
|
|
struct ps_input
|
|
{
|
|
float4 pos : SV_POSITION;
|
|
float3 offsets : TEXCOORD0;
|
|
#if USE_ALPHA_TEST || VFX_USE_ALPHA_CURRENT
|
|
// x: alpha
|
|
// y: alpha threshold
|
|
nointerpolation float2 builtInInterpolants : TEXCOORD1;
|
|
#endif
|
|
#if VFX_PASSDEPTH == VFX_PASSDEPTH_MOTION_VECTOR
|
|
VFX_DECLARE_MOTION_VECTORS_STORAGE(2,3)
|
|
#endif
|
|
|
|
nointerpolation uint faceID : TEXCOORD4;
|
|
|
|
UNITY_VERTEX_OUTPUT_STEREO
|
|
|
|
VFX_VERTEX_OUTPUT_INSTANCE_INDEX
|
|
|
|
};
|
|
|
|
#define VFX_VARYING_PS_INPUTS ps_input
|
|
#define VFX_VARYING_POSCS pos
|
|
#if USE_ALPHA_TEST || VFX_USE_ALPHA_CURRENT
|
|
#define VFX_VARYING_ALPHA builtInInterpolants.x
|
|
#define VFX_VARYING_ALPHATHRESHOLD builtInInterpolants.y
|
|
#endif
|
|
#define VFX_VARYING_OFFSETS offsets
|
|
#define VFX_VARYING_FACEID faceID
|
|
#if VFX_PASSDEPTH == VFX_PASSDEPTH_MOTION_VECTOR
|
|
#define VFX_VARYING_VELOCITY_CPOS VFX_DECLARE_MOTION_VECTORS_VARYING_NONJITTER
|
|
#define VFX_VARYING_VELOCITY_CPOS_PREVIOUS VFX_DECLARE_MOTION_VECTORS_VARYING_PREVIOUS
|
|
#endif
|
|
|
|
#if VFX_PASSDEPTH == VFX_PASSDEPTH_MOTION_VECTOR
|
|
${VFXPassVelocityDefine}
|
|
#elif VFX_PASSDEPTH == VFX_PASSDEPTH_SHADOW
|
|
${VFXPassShadowDefine}
|
|
#elif VFX_PASSDEPTH == VFX_PASSDEPTH_ACTUAL || VFX_PASSDEPTH == VFX_PASSDEPTH_SELECTION || VFX_PASSDEPTH == VFX_PASSDEPTH_PICKING
|
|
${VFXPassDepthDefine}
|
|
#endif
|
|
|
|
${VFXBegin:VFXVertexAdditionalProcess}
|
|
#if VFX_PASSDEPTH == VFX_PASSDEPTH_SHADOW
|
|
VFXApplyShadowBias(o.VFX_VARYING_POSCS, vPosWS);
|
|
#endif
|
|
${VFXEnd}
|
|
|
|
${VFXInclude("Shaders/ParticleHexahedron/Pass.template")}
|
|
#define VFX_PROCEDURAL_UV VFXCubeGetUV
|
|
#define VFX_SUPPORT_MAIN_TEXTURE_SAMPLING_IN_FRAGMENT_DEPTH 1
|
|
${VFXPassDepthCommonFragmentUnlit}
|