diff options
author | Juan Linietsky <reduzio@gmail.com> | 2023-01-21 10:24:45 +0100 |
---|---|---|
committer | Juan Linietsky <reduzio@gmail.com> | 2023-01-21 12:56:28 +0100 |
commit | 7dbc458bb4f3e0cc94e5070bd33bde41d214c98d (patch) | |
tree | b06d45ea296ca0c4d28fe8e323ee773ba3221278 /doc/classes | |
parent | 9f74f0f6c5e5c98b18f4f0ad95092a88d064f616 (diff) |
Clean up shader parameter remap
This PR is a follow up to #64092, which fixed important issues but it was implemented in an overly complex and inefficient way (because it forced the default code path to always go through string operations).
This cleans up all the shader parameter code.
This fixes #54336. Also fixes #56219 because, as the new code never queries the RenderingServer on load, potential deadlocks are avoided.
**NOTE**: materials saved between #62972 and #64092 will no longer work and will need to be resaved in an earlier version.
Diffstat (limited to 'doc/classes')
-rw-r--r-- | doc/classes/Shader.xml | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/doc/classes/Shader.xml b/doc/classes/Shader.xml index 75f835260a..c472ab647e 100644 --- a/doc/classes/Shader.xml +++ b/doc/classes/Shader.xml @@ -26,12 +26,12 @@ Returns the shader mode for the shader, either [constant MODE_CANVAS_ITEM], [constant MODE_SPATIAL] or [constant MODE_PARTICLES]. </description> </method> - <method name="has_parameter" qualifiers="const"> - <return type="bool" /> - <param index="0" name="name" type="StringName" /> + <method name="get_shader_uniform_list"> + <return type="Array" /> + <param index="0" name="get_groups" type="bool" default="false" /> <description> - Returns [code]true[/code] if the shader has this param defined as a uniform in its code. - [b]Note:[/b] [param name] must match the name of the uniform in the code exactly. + Get the list of shader uniforms that can be assigned to a [ShaderMaterial], for use with [method ShaderMaterial.set_shader_parameter] and [method ShaderMaterial.get_shader_parameter]. The parameters returned are contained in dictionaries in a similar format to the ones returned by [method Object.get_property_list]. + If argument [param get_groups] is true, parameter grouping hints will be provided. </description> </method> <method name="set_default_texture_parameter"> |