mirror of
https://github.com/godotengine/godot.git
synced 2025-12-08 06:09:55 +00:00
Error on hint_normal_roughness_texture and hint_depth_texture outside of spatial shader
(cherry picked from commit 528e0d095e)
This commit is contained in:
parent
c6f7675b1f
commit
01324f025a
1 changed files with 8 additions and 0 deletions
|
|
@ -8798,11 +8798,19 @@ Error ShaderLanguage::_parse_shader(const HashMap<StringName, FunctionInfo> &p_f
|
||||||
_set_error(RTR("'hint_normal_roughness_texture' is not supported in gl_compatibility shaders."));
|
_set_error(RTR("'hint_normal_roughness_texture' is not supported in gl_compatibility shaders."));
|
||||||
return ERR_PARSE_ERROR;
|
return ERR_PARSE_ERROR;
|
||||||
}
|
}
|
||||||
|
if (String(shader_type_identifier) != "spatial") {
|
||||||
|
_set_error(vformat(RTR("'hint_normal_roughness_texture' is not supported in '%s' shaders."), shader_type_identifier));
|
||||||
|
return ERR_PARSE_ERROR;
|
||||||
|
}
|
||||||
} break;
|
} break;
|
||||||
case TK_HINT_DEPTH_TEXTURE: {
|
case TK_HINT_DEPTH_TEXTURE: {
|
||||||
new_hint = ShaderNode::Uniform::HINT_DEPTH_TEXTURE;
|
new_hint = ShaderNode::Uniform::HINT_DEPTH_TEXTURE;
|
||||||
--texture_uniforms;
|
--texture_uniforms;
|
||||||
--texture_binding;
|
--texture_binding;
|
||||||
|
if (String(shader_type_identifier) != "spatial") {
|
||||||
|
_set_error(vformat(RTR("'hint_depth_texture' is not supported in '%s' shaders."), shader_type_identifier));
|
||||||
|
return ERR_PARSE_ERROR;
|
||||||
|
}
|
||||||
} break;
|
} break;
|
||||||
case TK_FILTER_NEAREST: {
|
case TK_FILTER_NEAREST: {
|
||||||
new_filter = FILTER_NEAREST;
|
new_filter = FILTER_NEAREST;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue