Setting default values for hinted uniforms

This commit is contained in:
JFonS
2018-03-16 18:11:24 +01:00
committed by GitHub
parent 42fa8a4ac6
commit 430b141ee6

View File

@@ -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);