1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-04 12:00:25 +00:00

Clarify the difference between uniforms and per-instance uniforms in docs

This commit is contained in:
Hugo Locurcio
2023-01-11 20:08:33 +01:00
parent f73cb4c13d
commit 2841047657
2 changed files with 6 additions and 2 deletions

View File

@@ -21,7 +21,10 @@
<param index="0" name="name" type="StringName" />
<param index="1" name="value" type="Variant" />
<description>
Set the value of a shader parameter for this instance only.
Set the value of a shader uniform for this instance only ([url=$DOCS_URL/tutorials/shaders/shader_reference/shading_language.html#per-instance-uniforms]per-instance uniform[/url]). See also [method ShaderMaterial.set_shader_parameter] to assign a uniform on all instances using the same [ShaderMaterial].
[b]Note:[/b] For a shader uniform to be assignable on a per-instance basis, it [i]must[/i] be defined with [code]instance uniform ...[/code] rather than [code]uniform ...[/code] in the shader code.
[b]Note:[/b] [param name] 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] Per-instance shader uniforms are currently only available in 3D, so there is no 2D equivalent of this method.
</description>
</method>
</methods>