diff options
author | clayjohn <claynjohn@gmail.com> | 2023-07-18 11:21:27 +0200 |
---|---|---|
committer | clayjohn <claynjohn@gmail.com> | 2023-07-21 16:42:30 +0200 |
commit | e970f5249cd00ad28cd16bc4f07c02d69090affa (patch) | |
tree | 1f80cd67935b7d2b024f26f077c681e10e79e8a9 /doc | |
parent | f8dbed4d0aef09ae7f4e3d66213268dba23a31d6 (diff) | |
download | redot-engine-e970f5249cd00ad28cd16bc4f07c02d69090affa.tar.gz |
Add Shader compile groups to RD Shader system
This allows us to specify a subset of variants to compile at load time and conditionally other variants later.
This works seamlessly with shader caching.
Needed to ensure that users only pay the cost for variants they use
Diffstat (limited to 'doc')
-rw-r--r-- | doc/classes/RenderingDevice.xml | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/doc/classes/RenderingDevice.xml b/doc/classes/RenderingDevice.xml index 73507b10a7..02ec05fe79 100644 --- a/doc/classes/RenderingDevice.xml +++ b/doc/classes/RenderingDevice.xml @@ -619,6 +619,7 @@ <method name="shader_create_from_bytecode"> <return type="RID" /> <param index="0" name="binary_data" type="PackedByteArray" /> + <param index="1" name="placeholder_rid" type="RID" default="RID()" /> <description> Creates a new shader instance from a binary compiled shader. It can be accessed with the RID that is returned. Once finished with your RID, you will want to free the RID using the RenderingDevice's [method free_rid] method. See also [method shader_compile_binary_from_spirv] and [method shader_create_from_spirv]. @@ -633,6 +634,12 @@ Once finished with your RID, you will want to free the RID using the RenderingDevice's [method free_rid] method. See also [method shader_compile_spirv_from_source] and [method shader_create_from_bytecode]. </description> </method> + <method name="shader_create_placeholder"> + <return type="RID" /> + <description> + Create a placeholder RID by allocating an RID without initializing it for use in [method shader_create_from_bytecode]. This allows you to create an RID for a shader and pass it around, but defer compiling the shader to a later time. + </description> + </method> <method name="shader_get_vertex_input_attribute_mask"> <return type="int" /> <param index="0" name="shader" type="RID" /> |