diff options
Diffstat (limited to 'doc/classes/ShaderMaterial.xml')
-rw-r--r-- | doc/classes/ShaderMaterial.xml | 27 |
1 files changed, 7 insertions, 20 deletions
diff --git a/doc/classes/ShaderMaterial.xml b/doc/classes/ShaderMaterial.xml index 672b660c34..a2346822e5 100644 --- a/doc/classes/ShaderMaterial.xml +++ b/doc/classes/ShaderMaterial.xml @@ -10,34 +10,21 @@ <link title="Shaders documentation index">$DOCS_URL/tutorials/shaders/index.html</link> </tutorials> <methods> - <method name="get_shader_param" qualifiers="const"> + <method name="get_shader_parameter" qualifiers="const"> <return type="Variant" /> - <argument index="0" name="param" type="StringName" /> + <param index="0" name="param" type="StringName" /> <description> Returns the current value set for this material of a uniform in the shader. </description> </method> - <method name="property_can_revert"> - <return type="bool" /> - <argument index="0" name="name" type="String" /> - <description> - Returns [code]true[/code] if the property identified by [code]name[/code] can be reverted to a default value. - </description> - </method> - <method name="property_get_revert"> - <return type="Variant" /> - <argument index="0" name="name" type="String" /> - <description> - Returns the default value of the material property with given [code]name[/code]. - </description> - </method> - <method name="set_shader_param"> + <method name="set_shader_parameter"> <return type="void" /> - <argument index="0" name="param" type="StringName" /> - <argument index="1" name="value" type="Variant" /> + <param index="0" name="param" type="StringName" /> + <param index="1" name="value" type="Variant" /> <description> Changes the value set for this material of a uniform in the shader. - [b]Note:[/b] [code]param[/code] must match the name of the uniform in the code exactly. + [b]Note:[/b] [param param] is case-sensitive and must match the name of the uniform in the code exactly (not the capitalized name in the inspector). + [b]Note:[/b] Changes to the shader uniform will be effective on all instances using this [ShaderMaterial]. To prevent this, use per-instance uniforms with [method GeometryInstance3D.set_instance_shader_parameter] or duplicate the [ShaderMaterial] resource using [method Resource.duplicate]. Per-instance uniforms allow for better shader reuse and are therefore faster, so they should be preferred over duplicating the [ShaderMaterial] when possible. </description> </method> </methods> |