From 97ed3dcf71515e19fd9006a897dec8833e1791d0 Mon Sep 17 00:00:00 2001 From: clayjohn Date: Mon, 30 Jan 2023 09:04:34 -0800 Subject: Add a shader error when trying to using hint_normal_roughness_texture in the gl_compatibility renderer --- servers/rendering/shader_language.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'servers/rendering') diff --git a/servers/rendering/shader_language.cpp b/servers/rendering/shader_language.cpp index 7a4ac709f4..11a9303f11 100644 --- a/servers/rendering/shader_language.cpp +++ b/servers/rendering/shader_language.cpp @@ -8759,6 +8759,10 @@ 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.")); + return ERR_PARSE_ERROR; + } } break; case TK_HINT_DEPTH_TEXTURE: { new_hint = ShaderNode::Uniform::HINT_DEPTH_TEXTURE; -- cgit v1.2.3