Documentation

Unity Engine


User Manual

Script Reference

Unity Engine


RayTracingShader

A shader for GPU ray tracing.
Read time 4 minutesLast updated 5 days ago

Definition

public sealed class RayTracingShader : Object

Remarks

This shader should contain at least a
raygeneration
shader.

Properties

Property

Description

maxRecursionDepthThe maximum number of ray bounces this shader can trace (Read Only).

Methods

Method

Description

DispatchDispatches this RayTracingShader.
DispatchIndirectDispatches this RayTracingShader.
SetAccelerationStructureSets the value for RayTracingAccelerationStructure property of this RayTracingShader.
SetBoolSets the value of a boolean uniform.
SetBufferBinds an input or output compute buffer.
SetConstantBufferBinds a constant buffer created through a ComputeBuffer or a GraphicsBuffer.
SetFloatSets the value of a float uniform.
SetFloatsSets the values for a float array uniform.
SetIntSets the value of a int uniform.
SetIntsSets the values for a int array uniform.
SetMatrixSets the value of a matrix uniform.
SetMatrixArraySets a matrix array uniform.
SetShaderPassSelects which Shader Pass to use when executing ray/geometry intersection shaders.
SetTextureBinds a texture resource. This can be a input or an output texture (UAV).
SetTextureFromGlobalBinds a global texture to a RayTracingShader.
SetVectorSets the value for a vector uniform.
SetVectorArraySets a vector array uniform.

Inheritance

Inherited Members

Operators

Operator

Description

operator ==Compares two object references to see if they refer to the same object.
boolDetermines whether the object exists.
operator !=Compares if two objects refer to a different object.