mirror of
https://github.com/godotengine/godot.git
synced 2025-11-01 06:01:14 +00:00
Merge pull request #79100 from KoBeWi/[filter,_filter,_filter,_filter,_filter,_filter]
Allow more hint types for uniform arrays
This commit is contained in:
commit
65cc4db0ae
1 changed files with 6 additions and 1 deletions
|
|
@ -8619,7 +8619,12 @@ Error ShaderLanguage::_parse_shader(const HashMap<StringName, FunctionInfo> &p_f
|
||||||
}
|
}
|
||||||
|
|
||||||
if (uniform.array_size > 0) {
|
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."));
|
_set_error(RTR("This hint is not supported for uniform arrays."));
|
||||||
return ERR_PARSE_ERROR;
|
return ERR_PARSE_ERROR;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue