From 2a93681334d3388eebbe1ba34e633a40ed9f1333 Mon Sep 17 00:00:00 2001 From: lewiji Date: Thu, 29 Jun 2023 16:18:31 +0100 Subject: [PATCH] Return shader parse error when using 'hint_normal_roughness_texture' and not using the Forward+ backend --- servers/rendering/shader_language.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/servers/rendering/shader_language.cpp b/servers/rendering/shader_language.cpp index ca41cc8d51f..e44b51d3918 100644 --- a/servers/rendering/shader_language.cpp +++ b/servers/rendering/shader_language.cpp @@ -8800,8 +8800,8 @@ Error ShaderLanguage::_parse_shader(const HashMap &p_f new_hint = ShaderNode::Uniform::HINT_NORMAL_ROUGHNESS_TEXTURE; --texture_uniforms; --texture_binding; - if (OS::get_singleton()->get_current_rendering_method() == "gl_compatibility") { - _set_error(RTR("'hint_normal_roughness_texture' is not supported in gl_compatibility shaders.")); + if (OS::get_singleton()->get_current_rendering_method() != "forward_plus") { + _set_error(RTR("'hint_normal_roughness_texture' is only available when using the Forward+ backend.")); return ERR_PARSE_ERROR; } if (String(shader_type_identifier) != "spatial") {