diff options
author | Rémi Verschelde <rverschelde@gmail.com> | 2023-01-19 10:08:43 +0100 |
---|---|---|
committer | Rémi Verschelde <rverschelde@gmail.com> | 2023-01-19 10:08:43 +0100 |
commit | 258856262350e30c5b05cd321c5002d337f7a908 (patch) | |
tree | 542d856ac966ecb34fa2048c01cabd9873fcab5d /servers/rendering/shader_language.cpp | |
parent | 1a4f7c985a7be29d3032d96125fdad56afd5b40d (diff) | |
parent | faea9f5c10abfc66284ea208d4f20eb03732a3bd (diff) |
Merge pull request #70967 from clayjohn/remove_screen-texture
Remove SCREEN_TEXTURE, DEPTH_TEXTURE, and NORMAL_ROUGHNESS_TEXTURE
Diffstat (limited to 'servers/rendering/shader_language.cpp')
-rw-r--r-- | servers/rendering/shader_language.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/servers/rendering/shader_language.cpp b/servers/rendering/shader_language.cpp index 59a2ff66f3..5ecc38a63b 100644 --- a/servers/rendering/shader_language.cpp +++ b/servers/rendering/shader_language.cpp @@ -5399,6 +5399,12 @@ ShaderLanguage::Node *ShaderLanguage::_parse_expression(BlockNode *p_block, cons } } else { if (!_find_identifier(p_block, false, p_function_info, identifier, &data_type, &ident_type, &is_const, &array_size, &struct_name)) { + if (identifier == "SCREEN_TEXTURE" || identifier == "DEPTH_TEXTURE" || identifier == "NORMAL_ROUGHNESS_TEXTURE") { + String name = String(identifier); + String name_lower = name.to_lower(); + _set_error(vformat(RTR("%s has been removed in favor of using hint_%s with a uniform.\nTo continue with minimal code changes add 'uniform sampler2D %s : hint_%s, filter_linear_mipmaps;' near the top of your shader."), name, name_lower, name, name_lower)); + return nullptr; + } _set_error(vformat(RTR("Unknown identifier in expression: '%s'."), String(identifier))); return nullptr; } |