Version: 2022.1

CommandBuffer.SetRayTracingAccelerationStructure

切换到手册
public void SetRayTracingAccelerationStructure (Experimental.Rendering.RayTracingShader rayTracingShader, string name, Experimental.Rendering.RayTracingAccelerationStructure rayTracingAccelerationStructure);
public void SetRayTracingAccelerationStructure (Experimental.Rendering.RayTracingShader rayTracingShader, int nameID, Experimental.Rendering.RayTracingAccelerationStructure rayTracingAccelerationStructure);

参数

rayTracingShader The RayTracingShader to set parameter for.
name 着色器代码中的 RayTracingAccelerationStructure 的名称。
nameID 属性名称 ID。使用 Shader.PropertyToID 可获取此 ID。
rayTracingAccelerationStructure The RayTracingAccelerationStructure to be used.

描述

添加命令以设置要与 RayTracingShader 一起使用的 RayTracingAccelerationStructure

The RayTracingAccelerationStructure specified as argument is visible globally in all ray tracing shader types (e.g. closesthit, anyhit, miss, etc.).