summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorclayjohn <claynjohn@gmail.com>2023-01-30 09:04:34 -0800
committerclayjohn <claynjohn@gmail.com>2023-01-30 09:04:34 -0800
commit97ed3dcf71515e19fd9006a897dec8833e1791d0 (patch)
tree682b3452a81816fe02b29fcddd4adfc38355b724
parent551f5191e5dbc1d1a43f99b13d5dbbf7f598dc58 (diff)
Add a shader error when trying to using hint_normal_roughness_texture in the gl_compatibility renderer
-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;