diff options
author | Yuri Rubinsky <chaosus89@gmail.com> | 2022-11-01 19:52:49 +0300 |
---|---|---|
committer | Yuri Rubinsky <chaosus89@gmail.com> | 2022-11-01 19:53:05 +0300 |
commit | 0a85d3b0ccf8c71450c5ba72d6052e8e211dac42 (patch) | |
tree | c18e3fe8724e1e5f87c7af35749a337c27007480 /servers | |
parent | e6751549cf7247965d1744b8c464f5e901006f21 (diff) |
Fix predefined constants to be accessible in the shader includes
Diffstat (limited to 'servers')
-rw-r--r-- | servers/rendering/shader_language.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/servers/rendering/shader_language.cpp b/servers/rendering/shader_language.cpp index 4d27c400f0..2f5846f520 100644 --- a/servers/rendering/shader_language.cpp +++ b/servers/rendering/shader_language.cpp @@ -1251,7 +1251,7 @@ bool ShaderLanguage::_find_identifier(const BlockNode *p_block, bool p_allow_rea if (is_shader_inc) { for (int i = 0; i < RenderingServer::SHADER_MAX; i++) { for (const KeyValue<StringName, FunctionInfo> &E : ShaderTypes::get_singleton()->get_functions(RenderingServer::ShaderMode(i))) { - if ((current_function == E.key || E.key == "global") && E.value.built_ins.has(p_identifier)) { + if ((current_function == E.key || E.key == "global" || E.key == "constants") && E.value.built_ins.has(p_identifier)) { if (r_data_type) { *r_data_type = E.value.built_ins[p_identifier].type; } |