diff options
Diffstat (limited to 'servers/rendering/shader_compiler.cpp')
-rw-r--r-- | servers/rendering/shader_compiler.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/servers/rendering/shader_compiler.cpp b/servers/rendering/shader_compiler.cpp index 3a0b9cf158..e7339b2cdd 100644 --- a/servers/rendering/shader_compiler.cpp +++ b/servers/rendering/shader_compiler.cpp @@ -951,7 +951,7 @@ String ShaderCompiler::_dump_node_code(const SL::Node *p_node, int p_level, Gene code = _get_global_shader_uniform_from_type_and_index(p_default_actions.global_buffer_array_variable, code, u.type); } else if (u.scope == ShaderLanguage::ShaderNode::Uniform::SCOPE_INSTANCE) { //instance variable, index it as such - code = "(" + p_default_actions.instance_uniform_index_variable + "+" + itos(u.instance_index) + ")"; + code = "(" + p_default_actions.instance_uniform_index_variable + "+" + itos(u.instance_index) + "u)"; code = _get_global_shader_uniform_from_type_and_index(p_default_actions.global_buffer_array_variable, code, u.type); } else { //regular uniform, index from UBO @@ -1051,7 +1051,7 @@ String ShaderCompiler::_dump_node_code(const SL::Node *p_node, int p_level, Gene code = _get_global_shader_uniform_from_type_and_index(p_default_actions.global_buffer_array_variable, code, u.type); } else if (u.scope == ShaderLanguage::ShaderNode::Uniform::SCOPE_INSTANCE) { //instance variable, index it as such - code = "(" + p_default_actions.instance_uniform_index_variable + "+" + itos(u.instance_index) + ")"; + code = "(" + p_default_actions.instance_uniform_index_variable + "+" + itos(u.instance_index) + "u)"; code = _get_global_shader_uniform_from_type_and_index(p_default_actions.global_buffer_array_variable, code, u.type); } else { //regular uniform, index from UBO @@ -1354,7 +1354,7 @@ String ShaderCompiler::_dump_node_code(const SL::Node *p_node, int p_level, Gene } code += ")"; if (is_screen_texture && !texture_func_returns_data && actions.apply_luminance_multiplier) { - code = "(" + code + " * vec4(vec3(sc_luminance_multiplier), 1.0))"; + code = "(" + code + " * vec4(vec3(sc_luminance_multiplier()), 1.0))"; } if (is_normal_roughness_texture && !texture_func_returns_data) { code = "normal_roughness_compatibility(" + code + ")"; |