Browse Source

Setting default values for hinted uniforms

JFonS 7 years ago
parent
commit
430b141ee6
1 changed files with 2 additions and 1 deletions
  1. 2 1
      tutorials/shading/shading_language.rst

+ 2 - 1
tutorials/shading/shading_language.rst

@@ -422,7 +422,7 @@ to make the compiler understand what the uniform is used for.
 
 
     uniform vec4 color : hint_color;
     uniform vec4 color : hint_color;
     uniform float amount : hint_range(0, 1);
     uniform float amount : hint_range(0, 1);
-
+    uniform vec4 other_color : hint_color = vec4(1.0);
 
 
 Full list of hints below:
 Full list of hints below:
 
 
@@ -460,6 +460,7 @@ Uniforms can also be assigned default values:
     shader_type spatial;
     shader_type spatial;
 
 
     uniform vec4 some_vector = vec4(0.0);
     uniform vec4 some_vector = vec4(0.0);
+    uniform vec4 some_color : hint_color = vec4(1.0);