RemoveInstance
Removes a ray tracing instance associated with a Renderer from this RayTracingAccelerationStructure.
Read time 1 minuteLast updated 6 days ago
Definition
- Type: Method
- Namespace: UnityEngine.Rendering
- Assembly: UnityEngine.CoreModule
RemoveInstance(Renderer)
Removes a ray tracing instance associated with a Renderer from this RayTracingAccelerationStructure.
public void RemoveInstance(Renderer targetRenderer)
Parameters
The Renderer associated with the ray tracing instance.
RemoveInstance(int)
Removes a ray tracing instance associated with an axis-aligned bounding box (AABBs) GraphicsBuffer or a Mesh instance from this RayTracingAccelerationStructure.
public void RemoveInstance(int handle)
Parameters
The handle associated with an AABB or Mesh ray tracing instance.
Remarks
Note that to build the acceleration structure on the GPU, you must call RayTracingAccelerationStructure.Build or CommandBuffer.BuildRayTracingAccelerationStructure.
Additional Resources: RayTracingAccelerationStructure.AddInstance, RayTracingAccelerationStructure.ClearInstances.