Skip to content

Commit

Permalink
Allow more hint types for uniform arrays
Browse files Browse the repository at this point in the history
  • Loading branch information
KoBeWi committed Jul 6, 2023
1 parent b7c2fd2 commit 8ae2e66
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion servers/rendering/shader_language.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8612,7 +8612,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;
}
Expand Down

0 comments on commit 8ae2e66

Please sign in to comment.