Return shader parse error when using 'hint_normal_roughness_texture' and not using the Forward+ backend

This commit is contained in:
lewiji 2023-06-29 16:18:31 +01:00 committed by lewiji
parent 46424488ed
commit 2a93681334
1 changed files with 2 additions and 2 deletions

View File

@ -8800,8 +8800,8 @@ Error ShaderLanguage::_parse_shader(const HashMap<StringName, FunctionInfo> &p_f
new_hint = ShaderNode::Uniform::HINT_NORMAL_ROUGHNESS_TEXTURE; new_hint = ShaderNode::Uniform::HINT_NORMAL_ROUGHNESS_TEXTURE;
--texture_uniforms; --texture_uniforms;
--texture_binding; --texture_binding;
if (OS::get_singleton()->get_current_rendering_method() == "gl_compatibility") { if (OS::get_singleton()->get_current_rendering_method() != "forward_plus") {
_set_error(RTR("'hint_normal_roughness_texture' is not supported in gl_compatibility shaders.")); _set_error(RTR("'hint_normal_roughness_texture' is only available when using the Forward+ backend."));
return ERR_PARSE_ERROR; return ERR_PARSE_ERROR;
} }
if (String(shader_type_identifier) != "spatial") { if (String(shader_type_identifier) != "spatial") {