Merge pull request #116888 from Chaosus/shader_fix_struct

Allow using a struct name as a variable name in shaders
This commit is contained in:
Thaddeus Crews 2026-03-09 15:18:11 -05:00
commit cc970e91e5
No known key found for this signature in database
GPG key ID: 8C6E5FEB5FC03CCC

View file

@ -8023,7 +8023,7 @@ Error ShaderLanguage::_parse_block(BlockNode *p_block, const FunctionInfo &p_fun
}
}
bool is_struct = shader->structs.has(tk.text);
bool is_struct = shader->structs.has(tk.text) && !(p_block && _find_identifier(p_block, false, p_function_info, tk.text));
bool is_var_init = false;
bool is_condition = false;