AddVFXInstances(Renderer, uint[])
Adds the ray tracing instances associated with a VFXRenderer to the RayTracingAccelerationStructure.
Read time 1 minuteLast updated 8 days ago
Definition
- Type: Method
- Namespace: UnityEngine.Rendering
- Assembly: UnityEngine.CoreModule
public void AddVFXInstances(Renderer targetRenderer, uint[] vfxSystemMasks)
Parameters
Remarks
Ray tracing instances in the acceleration structure contain an 8-bit user defined instance mask. The HLSL function has an 8-bit input parameter, which gets ANDed with the instance mask from any ray tracing instance that is a candidate for intersection during acceleration structure traversal on the GPU. If the result of the AND operation is zero, the intersection is ignored.
TraceRay()InstanceInclusionMaskOne VFXRenderer can have more than one ray tracing instance if it contains multiple output contexts. This method adds all the instances of outputs which enable ray tracing, with the masks specified in vfxSystemMasks.