Class reference

RDPipelineSpecializationConstant

Inherits RefCounted

Pipeline specialization constant (used by RenderingDevice).

Description

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.

Properties

int constant_id = 0

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.

Variant value

The specialization constant's value. Only bool, int and float types are valid for specialization constants.

Source revision 4f5b14abade2
Connection interrupted. Reload×

Rejoining the server...

Rejoin failed... trying again in seconds.

Failed to rejoin.
Please retry or reload the page.

The session has been paused by the server.

Failed to resume the session.
Please retry or reload the page.