Version: Unity 6.7 Beta (6000.7)
LanguageEnglish
  • C#

RayTracingAABBsInstanceConfig.rayTracingMode

Suggest a change

Success!

Thank you for helping us improve the quality of Unity Documentation. Although we cannot accept all submissions, we do read each suggested change from our users and will make updates where applicable.

Close

Submission failed

For some reason your suggested change could not be submitted. Please <a>try again</a> in a few minutes. And thank you for taking the time to help us improve the quality of Unity Documentation.

Close

Cancel

public RayTracingMode rayTracingMode;

Description

The RayTracingMode that you can use to control how the geometry associated with an axis-aligned bounding box (AABB) ray tracing instance is updated.

Use RayTracingMode.DynamicGeometry if the data in RayTracingAABBsInstanceConfig.aabbBuffer changes every frame. Unity then rebuilds the acceleration structure of the geometry referenced by this ray tracing instance configuration every time you build the RayTracingAccelerationStructure.

Use RayTracingMode.DynamicGeometryManualUpdate if the data changes only occasionally. Unity then rebuilds the acceleration structure only if you call RayTracingAccelerationStructure.UpdateInstanceGeometry before you build the RayTracingAccelerationStructure.

The default value is RayTracingMode.Static. Unity then builds the acceleration structure of the geometry once, and doesn't rebuild it when the data in RayTracingAABBsInstanceConfig.aabbBuffer changes.

RayTracingAccelerationStructure.AddInstance doesn't add the ray tracing instance and returns 0 if this value is RayTracingMode.Off, or if this value isn't in the ray tracing mode mask you specified when you created the RayTracingAccelerationStructure.