Merge pull request #72393 from clayjohn/GLES3-normal-roughness-error

Add a shader error when trying to using hint_normal_roughness_texture in the gl_compatibility renderer
This commit is contained in:
Rémi Verschelde 2023-01-30 20:26:50 +01:00
commit 58a0c4c69e
No known key found for this signature in database
GPG key ID: C3336907360768E1

View file

@ -8759,6 +8759,10 @@ 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."));
return ERR_PARSE_ERROR;
}
} break;
case TK_HINT_DEPTH_TEXTURE: {
new_hint = ShaderNode::Uniform::HINT_DEPTH_TEXTURE;