Merge pull request #79402 from Haydoggo/repeat-filter-autocomplete
Add autocomplete for filter/repeat hints on uniform arrays
This commit is contained in:
commit
f880892c3d
1 changed files with 12 additions and 12 deletions
|
@ -10549,11 +10549,6 @@ Error ShaderLanguage::complete(const String &p_code, const ShaderCompileInfo &p_
|
|||
}
|
||||
} else if ((int(completion_base) > int(TYPE_MAT4) && int(completion_base) < int(TYPE_STRUCT))) {
|
||||
Vector<String> options;
|
||||
if (completion_base_array) {
|
||||
if (current_uniform_hint == ShaderNode::Uniform::HINT_NONE) {
|
||||
options.push_back("source_color");
|
||||
}
|
||||
} else {
|
||||
if (current_uniform_filter == FILTER_DEFAULT) {
|
||||
options.push_back("filter_linear");
|
||||
options.push_back("filter_linear_mipmap");
|
||||
|
@ -10562,6 +10557,15 @@ Error ShaderLanguage::complete(const String &p_code, const ShaderCompileInfo &p_
|
|||
options.push_back("filter_nearest_mipmap");
|
||||
options.push_back("filter_nearest_mipmap_anisotropic");
|
||||
}
|
||||
if (current_uniform_repeat == REPEAT_DEFAULT) {
|
||||
options.push_back("repeat_enable");
|
||||
options.push_back("repeat_disable");
|
||||
}
|
||||
if (completion_base_array) {
|
||||
if (current_uniform_hint == ShaderNode::Uniform::HINT_NONE) {
|
||||
options.push_back("source_color");
|
||||
}
|
||||
} else {
|
||||
if (current_uniform_hint == ShaderNode::Uniform::HINT_NONE) {
|
||||
options.push_back("hint_anisotropy");
|
||||
options.push_back("hint_default_black");
|
||||
|
@ -10579,10 +10583,6 @@ Error ShaderLanguage::complete(const String &p_code, const ShaderCompileInfo &p_
|
|||
options.push_back("hint_depth_texture");
|
||||
options.push_back("source_color");
|
||||
}
|
||||
if (current_uniform_repeat == REPEAT_DEFAULT) {
|
||||
options.push_back("repeat_enable");
|
||||
options.push_back("repeat_disable");
|
||||
}
|
||||
}
|
||||
|
||||
for (int i = 0; i < options.size(); i++) {
|
||||
|
|
Loading…
Reference in a new issue