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

Fix shader constant sorting

This commit is contained in:
Yuri Roubinsky
2020-04-11 12:40:17 +03:00
parent 8806e7d5f3
commit bc30f541e6
4 changed files with 21 additions and 14 deletions

View File

@@ -6219,6 +6219,7 @@ Error ShaderLanguage::_parse_shader(const Map<StringName, FunctionInfo> &p_funct
while (true) {
ShaderNode::Constant constant;
constant.name = name;
constant.type = is_struct ? TYPE_STRUCT : type;
constant.type_str = struct_name;
constant.precision = precision;
@@ -6258,6 +6259,8 @@ Error ShaderLanguage::_parse_shader(const Map<StringName, FunctionInfo> &p_funct
}
shader->constants[name] = constant;
shader->vconstants.push_back(constant);
if (tk.type == TK_COMMA) {
tk = _get_token();
if (tk.type != TK_IDENTIFIER) {