summaryrefslogtreecommitdiff
path: root/servers/rendering
diff options
context:
space:
mode:
authorRémi Verschelde <rverschelde@gmail.com>2023-01-30 20:26:50 +0100
committerRémi Verschelde <rverschelde@gmail.com>2023-01-30 20:26:50 +0100
commit58a0c4c69ea1af3268a44c3c087484c7f6aa38b0 (patch)
treee3e8e6df5fd52707280c23d55a19cbfc6b51e176 /servers/rendering
parente86953cb53d314da3ea4e40c65597dec40e4d2dc (diff)
parent97ed3dcf71515e19fd9006a897dec8833e1791d0 (diff)
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
Diffstat (limited to 'servers/rendering')
-rw-r--r--servers/rendering/shader_language.cpp4
1 files changed, 4 insertions, 0 deletions
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<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;