Skip to content

Commit

Permalink
Return shader parse error when using 'hint_normal_roughness_texture' …
Browse files Browse the repository at this point in the history
…and not using the Forward+ backend
  • Loading branch information
lewiji authored and lewiji committed Jun 29, 2023
1 parent 4642448 commit 2a93681
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions servers/rendering/shader_language.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8800,8 +8800,8 @@ Error ShaderLanguage::_parse_shader(const HashMap<StringName, FunctionInfo> &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") {
Expand Down

0 comments on commit 2a93681

Please sign in to comment.