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

Implement global and per instance shader uniforms.

Adds two keywords to shader language for uniforms:
-'global'
-'instance'

This allows them to reference values outside the material.
This commit is contained in:
Juan Linietsky
2020-04-16 23:52:00 -03:00
parent 30ab5c9baa
commit 0e1c66d9fc
49 changed files with 3124 additions and 69 deletions

View File

@@ -532,6 +532,11 @@ public:
FUNC5(instance_geometry_set_draw_range, RID, float, float, float, float)
FUNC2(instance_geometry_set_as_instance_lod, RID, RID)
FUNC3(instance_geometry_set_shader_parameter, RID, const StringName &, const Variant &)
FUNC2RC(Variant, instance_geometry_get_shader_parameter, RID, const StringName &)
FUNC2RC(Variant, instance_geometry_get_shader_parameter_default_value, RID, const StringName &)
FUNC2SC(instance_geometry_get_shader_parameter_list, RID, List<PropertyInfo> *)
/* CANVAS (2D) */
FUNCRID(canvas)
@@ -625,6 +630,18 @@ public:
FUNC2(canvas_occluder_polygon_set_cull_mode, RID, CanvasOccluderPolygonCullMode)
/* GLOBAL VARIABLES */
FUNC3(global_variable_add, const StringName &, GlobalVariableType, const Variant &)
FUNC1(global_variable_remove, const StringName &)
FUNC0RC(Vector<StringName>, global_variable_get_list)
FUNC2(global_variable_set, const StringName &, const Variant &)
FUNC2(global_variable_set_override, const StringName &, const Variant &)
FUNC1RC(GlobalVariableType, global_variable_get_type, const StringName &)
FUNC1RC(Variant, global_variable_get, const StringName &)
FUNC1(global_variables_load_settings, bool)
FUNC0(global_variables_clear)
/* BLACK BARS */
FUNC4(black_bars_set_margins, int, int, int, int)