diff options
author | Yuri Sizov <yuris@humnom.net> | 2023-07-12 14:18:34 +0200 |
---|---|---|
committer | Yuri Sizov <yuris@humnom.net> | 2023-07-12 14:18:34 +0200 |
commit | 65cc4db0ae7a80a9ec2b365f0cf6cbefcf2926f4 (patch) | |
tree | d90050ef81e4e5b1acce61a2f3c285a0a9935287 | |
parent | 64689c146ca7905836b5c30bffe2d34fa2cafce0 (diff) | |
parent | 8ae2e6681ee5dbb75994fe4b531c3eac1bf49965 (diff) | |
download | redot-engine-65cc4db0ae7a80a9ec2b365f0cf6cbefcf2926f4.tar.gz |
Merge pull request #79100 from KoBeWi/[filter,_filter,_filter,_filter,_filter,_filter]
Allow more hint types for uniform arrays
-rw-r--r-- | servers/rendering/shader_language.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/servers/rendering/shader_language.cpp b/servers/rendering/shader_language.cpp index 22e6f7d67d..ff4f670c58 100644 --- a/servers/rendering/shader_language.cpp +++ b/servers/rendering/shader_language.cpp @@ -8619,7 +8619,12 @@ Error ShaderLanguage::_parse_shader(const HashMap<StringName, FunctionInfo> &p_f } if (uniform.array_size > 0) { - if (tk.type != TK_HINT_SOURCE_COLOR) { + static Vector<int> supported_hints = { + TK_HINT_SOURCE_COLOR, TK_REPEAT_DISABLE, TK_REPEAT_ENABLE, + TK_FILTER_LINEAR, TK_FILTER_LINEAR_MIPMAP, TK_FILTER_LINEAR_MIPMAP_ANISOTROPIC, + TK_FILTER_NEAREST, TK_FILTER_NEAREST_MIPMAP, TK_FILTER_NEAREST_MIPMAP_ANISOTROPIC + }; + if (!supported_hints.has(tk.type)) { _set_error(RTR("This hint is not supported for uniform arrays.")); return ERR_PARSE_ERROR; } |