Build
Builds acceleration structures on the GPU. Allocates any GPU memory required for storing acceleration structure data.
Read time 1 minuteLast updated 6 days ago
Definition
- Type: Method
- Namespace: UnityEngine.Rendering
- Assembly: UnityEngine.CoreModule
Build()
Builds acceleration structures on the GPU. Allocates any GPU memory required for storing acceleration structure data.
public void Build()
Remarks
To ensure that the acceleration structure is up to date, call this method before using the acceleration structure in ray tracing shaders (for example before a RayTracingShader.Dispatch call) or when using inline ray tracing.
Additional Resources: SystemInfo.supportsRayTracingShaders, SystemInfo.supportsInlineRayTracing, CommandBuffer.BuildRayTracingAccelerationStructure.
Build(Vector3)
Builds acceleration structures on the GPU. Allocates any GPU memory required for storing acceleration structure data.
public void Build(Vector3 relativeOrigin)
Parameters
Remarks
To ensure that the acceleration structure is up to date, call this method before using the acceleration structure in ray tracing shaders (for example before a RayTracingShader.Dispatch call) or when using inline ray tracing.
Additional Resources: SystemInfo.supportsRayTracingShaders, SystemInfo.supportsInlineRayTracing, CommandBuffer.BuildRayTracingAccelerationStructure.
Build(BuildSettings)
Builds acceleration structures on the GPU. Allocates any GPU memory required for storing acceleration structure data.
public void Build(RayTracingAccelerationStructure.BuildSettings buildSettings)
Parameters
Remarks
To ensure that the acceleration structure is up to date, call this method before using the acceleration structure in ray tracing shaders (for example before a RayTracingShader.Dispatch call) or when using inline ray tracing.