summaryrefslogtreecommitdiff
path: root/doc/classes/RDPipelineSpecializationConstant.xml
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <remi@verschelde.fr>2023-05-12 15:08:03 +0200
committerGitHub <noreply@github.com>2023-05-12 15:08:03 +0200
commit2ac4e3bb30517998916bb6b81b7b76788276038c (patch)
tree245bf4614ff38f3b0fcac813c1dde8c39b57732d /doc/classes/RDPipelineSpecializationConstant.xml
parentfdf66b3472e5ca254a4f90c32f26c4702d46828b (diff)
parentfa8b32cbd4503e73a840bd1a1dd32d2a88cc3f45 (diff)
Merge pull request #76998 from akien-mga/4.0-cherrypicks
Cherry-picks for the 4.0 branch (future 4.0.3) - 4th batch
Diffstat (limited to 'doc/classes/RDPipelineSpecializationConstant.xml')
-rw-r--r--doc/classes/RDPipelineSpecializationConstant.xml5
1 files changed, 5 insertions, 0 deletions
diff --git a/doc/classes/RDPipelineSpecializationConstant.xml b/doc/classes/RDPipelineSpecializationConstant.xml
index 1528b9fcc1..d0bfa8130d 100644
--- a/doc/classes/RDPipelineSpecializationConstant.xml
+++ b/doc/classes/RDPipelineSpecializationConstant.xml
@@ -1,15 +1,20 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="RDPipelineSpecializationConstant" inherits="RefCounted" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
+ Pipeline specialization constant (used by [RenderingDevice]).
</brief_description>
<description>
+ A [i]specialization constant[/i] 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 [code]if[/code] branching, while still allowing shaders to be flexible for different use cases.
+ This object is used by [RenderingDevice].
</description>
<tutorials>
</tutorials>
<members>
<member name="constant_id" type="int" setter="set_constant_id" getter="get_constant_id" default="0">
+ The identifier of the specialization constant. This is a value starting from [code]0[/code] and that increments for every different specialization constant for a given shader.
</member>
<member name="value" type="Variant" setter="set_value" getter="get_value">
+ The specialization constant's value. Only [bool], [int] and [float] types are valid for specialization constants.
</member>
</members>
</class>