Documentation

Unity Engine


User Manual

Script Reference

Unity Engine


SetRayTracingBufferParam

Adds a command to set an input or output buffer parameter on a RayTracingShader.
Read time 4 minutesLast updated 4 days ago

Definition

SetRayTracingBufferParam(RayTracingShader, string, ComputeBuffer)

Adds a command to set an input or output buffer parameter on a RayTracingShader.
public void SetRayTracingBufferParam(RayTracingShader rayTracingShader, string name, ComputeBuffer buffer)

Parameters

rayTracingShader

The RayTracingShader to set parameter for.

name

The name of the buffer in shader code.

The buffer to set.

Remarks

Only shaders defined in the .raytrace file can access the buffer you designate as the argument for this method. To make this buffer accessible to all ray tracing shader types (closest hit, any hit, or miss, for example), call the CommandBuffer.SetGlobalBuffer or Shader.SetGlobalBuffer method instead.
Additional Resources: CommandBuffer.DispatchRays.

SetRayTracingBufferParam(RayTracingShader, int, ComputeBuffer)

Adds a command to set an input or output buffer parameter on a RayTracingShader.
public void SetRayTracingBufferParam(RayTracingShader rayTracingShader, int nameID, ComputeBuffer buffer)

Parameters

rayTracingShader

The RayTracingShader to set parameter for.

nameID

The ID of the property name for the buffer in shader code. Use Shader.PropertyToID to get this ID.

The buffer to set.

Remarks

Only shaders defined in the .raytrace file can access the buffer you designate as the argument for this method. To make this buffer accessible to all ray tracing shader types (closest hit, any hit, or miss, for example), call the CommandBuffer.SetGlobalBuffer or Shader.SetGlobalBuffer method instead.
Additional Resources: CommandBuffer.DispatchRays.

SetRayTracingBufferParam(RayTracingShader, string, GraphicsBuffer)

Adds a command to set an input or output buffer parameter on a RayTracingShader.
public void SetRayTracingBufferParam(RayTracingShader rayTracingShader, string name, GraphicsBuffer buffer)

Parameters

rayTracingShader

The RayTracingShader to set parameter for.

name

The name of the buffer in shader code.

The buffer to set.

Remarks

Only shaders defined in the .raytrace file can access the buffer you designate as the argument for this method. To make this buffer accessible to all ray tracing shader types (closest hit, any hit, or miss, for example), call the CommandBuffer.SetGlobalBuffer or Shader.SetGlobalBuffer method instead.
Additional Resources: CommandBuffer.DispatchRays.

SetRayTracingBufferParam(RayTracingShader, int, GraphicsBuffer)

Adds a command to set an input or output buffer parameter on a RayTracingShader.
public void SetRayTracingBufferParam(RayTracingShader rayTracingShader, int nameID, GraphicsBuffer buffer)

Parameters

rayTracingShader

The RayTracingShader to set parameter for.

nameID

The ID of the property name for the buffer in shader code. Use Shader.PropertyToID to get this ID.

The buffer to set.

Remarks

Only shaders defined in the .raytrace file can access the buffer you designate as the argument for this method. To make this buffer accessible to all ray tracing shader types (closest hit, any hit, or miss, for example), call the CommandBuffer.SetGlobalBuffer or Shader.SetGlobalBuffer method instead.
Additional Resources: CommandBuffer.DispatchRays.

SetRayTracingBufferParam(RayTracingShader, string, GraphicsBufferHandle)

Adds a command to set an input or output buffer parameter on a RayTracingShader.
public void SetRayTracingBufferParam(RayTracingShader rayTracingShader, string name, GraphicsBufferHandle bufferHandle)

Parameters

rayTracingShader

The RayTracingShader to set parameter for.

name

The name of the buffer in shader code.

The handle of the buffer to set.

Remarks

Only shaders defined in the .raytrace file can access the buffer you designate as the argument for this method. To make this buffer accessible to all ray tracing shader types (closest hit, any hit, or miss, for example), call the CommandBuffer.SetGlobalBuffer or Shader.SetGlobalBuffer method instead.
Additional Resources: CommandBuffer.DispatchRays.

SetRayTracingBufferParam(RayTracingShader, int, GraphicsBufferHandle)

Adds a command to set an input or output buffer parameter on a RayTracingShader.
public void SetRayTracingBufferParam(RayTracingShader rayTracingShader, int nameID, GraphicsBufferHandle bufferHandle)

Parameters

rayTracingShader

The RayTracingShader to set parameter for.

nameID

The ID of the property name for the buffer in shader code. Use Shader.PropertyToID to get this ID.

The handle of the buffer to set.

Remarks

Only shaders defined in the .raytrace file can access the buffer you designate as the argument for this method. To make this buffer accessible to all ray tracing shader types (closest hit, any hit, or miss, for example), call the CommandBuffer.SetGlobalBuffer or Shader.SetGlobalBuffer method instead.
Additional Resources: CommandBuffer.DispatchRays.