Documentation

Unity Engine


User Manual

Script Reference

Unity Engine


SetAccelerationStructure

Sets the value for RayTracingAccelerationStructure property of this RayTracingShader.
Read time 1 minuteLast updated 8 days ago

Definition

SetAccelerationStructure(int, RayTracingAccelerationStructure)

Sets the value for RayTracingAccelerationStructure property of this RayTracingShader.
public void SetAccelerationStructure(int nameID, RayTracingAccelerationStructure accelerationStructure)

Parameters

nameID

The ID of the RayTracingAccelerationStructure as given by Shader.PropertyToID.

accelerationStructure

The value to set the RayTracingAccelerationStructure to.

Remarks

The RayTracingAccelerationStructure you specify as an argument is globally visible in all ray tracing shader types (e.g. closest hit, any hit, miss, etc.).

SetAccelerationStructure(string, RayTracingAccelerationStructure)

Sets the value for RayTracingAccelerationStructure property of this RayTracingShader.
public void SetAccelerationStructure(string name, RayTracingAccelerationStructure accelerationStructure)

Parameters

name

The name of the RayTracingAccelerationStructure being set.

accelerationStructure

The value to set the RayTracingAccelerationStructure to.

Remarks

The RayTracingAccelerationStructure you specify as an argument is globally visible in all ray tracing shader types (e.g. closest hit, any hit, miss, etc.).