SetRayTracingBufferParam
Adds a command to set an input or output buffer parameter on a RayTracingShader.
Read time 4 minutesLast updated 4 days ago
Definition
- Type: Method
- Namespace: UnityEngine.Rendering
- Assembly: UnityEngine.CoreModule
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
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
The RayTracingShader to set parameter for.
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
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
The RayTracingShader to set parameter for.
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
The RayTracingShader to set parameter for.
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
The RayTracingShader to set parameter for.
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.