RDPipelineSpecializationConstant
Pipeline specialization constant (used by RenderingDevice).
Pipeline specialization constant (used by RenderingDevice).
A specialization constant is a way to create additional variants of shaders without actually increasing the number of shader versions that are compiled. This allows improving performance by reducing the number of shader versions and reducing if branching, while still allowing shaders to be flexible for different use cases.
This object is used by RenderingDevice.
Declarations checked against C# SDK 1.0.0. Expand a name to see declarations and documentation.
Constructors1
RDPipelineSpecializationConstantConstructor
public RDPipelineSpecializationConstant();Properties2
ConstantIdProperty
public uint ConstantId { get; set; }The identifier of the specialization constant. This is a value starting from 0 and that increments for every different specialization constant for a given shader.
ValueProperty
public Variant Value { get; set; }The specialization constant's value. Only [bool], [int] and [float] types are valid for specialization constants.
Methods4
GetConstantIduint
public uint GetConstantId();uintGetValueVariant
public Variant GetValue();VariantSetConstantIdvoid
public void SetConstantId(uint constantId);| Name | Type | Default |
|---|---|---|
constantId | uint | — |
SetValuevoid
public void SetValue(Variant value);| Name | Type | Default |
|---|---|---|
value | Variant | — |