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

Fix shader constant sorting

This commit is contained in:
Yuri Roubinsky
2020-03-31 14:32:33 +03:00
parent e707b712e8
commit ee93c85ef1
4 changed files with 15 additions and 10 deletions

View File

@@ -5156,6 +5156,7 @@ Error ShaderLanguage::_parse_shader(const Map<StringName, FunctionInfo> &p_funct
while (true) {
ShaderNode::Constant constant;
constant.name = name;
constant.type = type;
constant.precision = precision;
constant.initializer = NULL;
@@ -5190,6 +5191,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) {