Version: 2022.3

CommandBuffer.SetRayTracingVectorArrayParam

切换到手册
public void SetRayTracingVectorArrayParam (Experimental.Rendering.RayTracingShader rayTracingShader, string name, params Vector4[] values);
public void SetRayTracingVectorArrayParam (Experimental.Rendering.RayTracingShader rayTracingShader, int nameID, params Vector4[] values);

参数

rayTracingShader RayTracingShader to set parameter for.
name 属性名称。
nameID 属性名称 ID。使用 Shader.PropertyToID 可获取此 ID。
values 要设置的值。

描述

添加用于在 RayTracingShader 中设置矢量数组参数的命令。

The value specified as argument can be used only by the shaders defined inside the .raytrace file associated with the RayTracingShader. If the value needs to be visible in all ray tracing shader types (closesthit, anyhit, miss, etc.) then CommandBuffer.SetGlobalVectorArray or Shader.SetGlobalVectorArray must be used.