58 lines
1.2 KiB
Plaintext
58 lines
1.2 KiB
Plaintext
${VFXShaderTags}
|
|
|
|
${VFXInclude("Shaders/VFXParticleCommon.template")}
|
|
${VFXOutputRenderState}
|
|
|
|
HLSLINCLUDE
|
|
|
|
${VFXGlobalInclude}
|
|
${VFXGlobalDeclaration}
|
|
|
|
#define VFX_NEEDS_COLOR_INTERPOLATOR (VFX_USE_COLOR_CURRENT || VFX_USE_ALPHA_CURRENT)
|
|
#if HAS_STRIPS
|
|
#define VFX_OPTIONAL_INTERPOLATION
|
|
#else
|
|
#define VFX_OPTIONAL_INTERPOLATION nointerpolation
|
|
#endif
|
|
|
|
ByteAddressBuffer attributeBuffer;
|
|
|
|
#if VFX_HAS_INDIRECT_DRAW
|
|
StructuredBuffer<uint> indirectBuffer;
|
|
#endif
|
|
|
|
#if USE_DEAD_LIST_COUNT
|
|
ByteAddressBuffer deadListCount;
|
|
#endif
|
|
|
|
#if HAS_STRIPS
|
|
Buffer<uint> stripDataBuffer;
|
|
#endif
|
|
|
|
#if VFX_FEATURE_MOTION_VECTORS
|
|
ByteAddressBuffer elementToVFXBufferPrevious;
|
|
|
|
#ifdef VFX_FEATURE_MOTION_VECTORS_VERTS
|
|
#define VFX_FEATURE_MOTION_VECTORS_INTERPOLATION noperspective
|
|
#else
|
|
#define VFX_FEATURE_MOTION_VECTORS_INTERPOLATION
|
|
#endif
|
|
|
|
#endif
|
|
|
|
CBUFFER_START(outputParams)
|
|
float nbMax;
|
|
float systemSeed;
|
|
CBUFFER_END
|
|
|
|
// Helper macros to always use a valid instanceID
|
|
#if defined(UNITY_STEREO_INSTANCING_ENABLED)
|
|
#define VFX_DECLARE_INSTANCE_ID UNITY_VERTEX_INPUT_INSTANCE_ID
|
|
#define VFX_GET_INSTANCE_ID(i) unity_InstanceID
|
|
#else
|
|
#define VFX_DECLARE_INSTANCE_ID uint instanceID : SV_InstanceID;
|
|
#define VFX_GET_INSTANCE_ID(i) i.instanceID
|
|
#endif
|
|
|
|
ENDHLSL
|