mirror of
https://github.com/godotengine/godot-docs.git
synced 2026-01-05 22:09:56 +03:00
Setting default values for hinted uniforms
This commit is contained in:
@@ -422,7 +422,7 @@ to make the compiler understand what the uniform is used for.
|
||||
|
||||
uniform vec4 color : hint_color;
|
||||
uniform float amount : hint_range(0, 1);
|
||||
|
||||
uniform vec4 other_color : hint_color = vec4(1.0);
|
||||
|
||||
Full list of hints below:
|
||||
|
||||
@@ -460,6 +460,7 @@ Uniforms can also be assigned default values:
|
||||
shader_type spatial;
|
||||
|
||||
uniform vec4 some_vector = vec4(0.0);
|
||||
uniform vec4 some_color : hint_color = vec4(1.0);
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user