From 747ae429de789b99bed4538c6b24ecaf7bdd98e0 Mon Sep 17 00:00:00 2001 From: jsjtxietian Date: Mon, 15 Jan 2024 17:22:03 +0800 Subject: [PATCH] Add missing check when insert function `normal_roughness_compatibility` --- servers/rendering/shader_compiler.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/servers/rendering/shader_compiler.cpp b/servers/rendering/shader_compiler.cpp index 6875400d1e6..2b49d42f9e5 100644 --- a/servers/rendering/shader_compiler.cpp +++ b/servers/rendering/shader_compiler.cpp @@ -1340,7 +1340,7 @@ String ShaderCompiler::_dump_node_code(const SL::Node *p_node, int p_level, Gene if (is_screen_texture && !texture_func_returns_data && actions.apply_luminance_multiplier) { code = "(" + code + " * vec4(vec3(sc_luminance_multiplier), 1.0))"; } - if (is_normal_roughness_texture) { + if (is_normal_roughness_texture && !texture_func_returns_data) { code = "normal_roughness_compatibility(" + code + ")"; } } break;