summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYuri Roubinsky <chaosus89@gmail.com>2021-12-15 13:14:20 +0300
committerYuri Roubinsky <chaosus89@gmail.com>2021-12-15 13:18:32 +0300
commit09185d76acbc079816fcc3cc423636706344f80f (patch)
tree76e74e9244a8869917b89200fb4a4a0ce05ce1c5
parent1930fc8b3150e3084c16557d82dc2c517e3f292b (diff)
Rename shader hint `filter_aniso` to `filter_anisotropy`
-rw-r--r--scene/resources/material.cpp6
-rw-r--r--servers/rendering/shader_language.cpp20
-rw-r--r--servers/rendering/shader_language.h8
3 files changed, 17 insertions, 17 deletions
diff --git a/scene/resources/material.cpp b/scene/resources/material.cpp
index 87aee0aae4..50e2de91f7 100644
--- a/scene/resources/material.cpp
+++ b/scene/resources/material.cpp
@@ -449,10 +449,10 @@ void BaseMaterial3D::_update_shader() {
texfilter_str = "filter_linear_mipmap";
break;
case TEXTURE_FILTER_NEAREST_WITH_MIPMAPS_ANISOTROPIC:
- texfilter_str = "filter_nearest_mipmap_aniso";
+ texfilter_str = "filter_nearest_mipmap_anisotropy";
break;
case TEXTURE_FILTER_LINEAR_WITH_MIPMAPS_ANISOTROPIC:
- texfilter_str = "filter_linear_mipmap_aniso";
+ texfilter_str = "filter_linear_mipmap_anisotropy";
break;
case TEXTURE_FILTER_MAX:
break; // Internal value, skip.
@@ -2569,7 +2569,7 @@ void BaseMaterial3D::_bind_methods() {
ADD_PROPERTYI(PropertyInfo(Variant::BOOL, "uv2_world_triplanar"), "set_flag", "get_flag", FLAG_UV2_USE_WORLD_TRIPLANAR);
ADD_GROUP("Sampling", "texture_");
- ADD_PROPERTY(PropertyInfo(Variant::INT, "texture_filter", PROPERTY_HINT_ENUM, "Nearest,Linear,Nearest Mipmap,Linear Mipmap,Nearest Mipmap Aniso.,Linear Mipmap Aniso."), "set_texture_filter", "get_texture_filter");
+ ADD_PROPERTY(PropertyInfo(Variant::INT, "texture_filter", PROPERTY_HINT_ENUM, "Nearest,Linear,Nearest Mipmap,Linear Mipmap,Nearest Mipmap Anisotropy,Linear Mipmap Anisotropy"), "set_texture_filter", "get_texture_filter");
ADD_PROPERTYI(PropertyInfo(Variant::BOOL, "texture_repeat"), "set_flag", "get_flag", FLAG_USE_TEXTURE_REPEAT);
ADD_GROUP("Shadows", "");
diff --git a/servers/rendering/shader_language.cpp b/servers/rendering/shader_language.cpp
index b077501a38..2a3abb0e82 100644
--- a/servers/rendering/shader_language.cpp
+++ b/servers/rendering/shader_language.cpp
@@ -214,8 +214,8 @@ const char *ShaderLanguage::token_names[TK_MAX] = {
"FILTER_LINEAR",
"FILTER_NEAREST_MIPMAP",
"FILTER_LINEAR_MIPMAP",
- "FILTER_NEAREST_MIPMAP_ANISO",
- "FILTER_LINEAR_MIPMAP_ANISO",
+ "FILTER_NEAREST_MIPMAP_ANISOTROPY",
+ "FILTER_LINEAR_MIPMAP_ANISOTROPY",
"REPEAT_ENABLE",
"REPEAT_DISABLE",
"SHADER_TYPE",
@@ -328,8 +328,8 @@ const ShaderLanguage::KeyWord ShaderLanguage::keyword_list[] = {
{ TK_FILTER_LINEAR, "filter_linear" },
{ TK_FILTER_NEAREST_MIPMAP, "filter_nearest_mipmap" },
{ TK_FILTER_LINEAR_MIPMAP, "filter_linear_mipmap" },
- { TK_FILTER_NEAREST_MIPMAP_ANISO, "filter_nearest_mipmap_aniso" },
- { TK_FILTER_LINEAR_MIPMAP_ANISO, "filter_linear_mipmap_aniso" },
+ { TK_FILTER_NEAREST_MIPMAP_ANISOTROPY, "filter_nearest_mipmap_anisotropy" },
+ { TK_FILTER_LINEAR_MIPMAP_ANISOTROPY, "filter_linear_mipmap_anisotropy" },
{ TK_REPEAT_ENABLE, "repeat_enable" },
{ TK_REPEAT_DISABLE, "repeat_disable" },
{ TK_SHADER_TYPE, "shader_type" },
@@ -8082,10 +8082,10 @@ Error ShaderLanguage::_parse_shader(const Map<StringName, FunctionInfo> &p_funct
uniform2.filter = FILTER_NEAREST_MIPMAP;
} else if (tk.type == TK_FILTER_LINEAR_MIPMAP) {
uniform2.filter = FILTER_LINEAR_MIPMAP;
- } else if (tk.type == TK_FILTER_NEAREST_MIPMAP_ANISO) {
- uniform2.filter = FILTER_NEAREST_MIPMAP_ANISO;
- } else if (tk.type == TK_FILTER_LINEAR_MIPMAP_ANISO) {
- uniform2.filter = FILTER_LINEAR_MIPMAP_ANISO;
+ } else if (tk.type == TK_FILTER_NEAREST_MIPMAP_ANISOTROPY) {
+ uniform2.filter = FILTER_NEAREST_MIPMAP_ANISOTROPY;
+ } else if (tk.type == TK_FILTER_LINEAR_MIPMAP_ANISOTROPY) {
+ uniform2.filter = FILTER_LINEAR_MIPMAP_ANISOTROPY;
} else if (tk.type == TK_REPEAT_DISABLE) {
uniform2.repeat = REPEAT_DISABLE;
} else if (tk.type == TK_REPEAT_ENABLE) {
@@ -9535,10 +9535,10 @@ Error ShaderLanguage::complete(const String &p_code, const ShaderCompileInfo &p_
if (options.is_empty()) {
options.push_back("filter_linear");
options.push_back("filter_linear_mipmap");
- options.push_back("filter_linear_mipmap_aniso");
+ options.push_back("filter_linear_mipmap_anisotropy");
options.push_back("filter_nearest");
options.push_back("filter_nearest_mipmap");
- options.push_back("filter_nearest_mipmap_aniso");
+ options.push_back("filter_nearest_mipmap_anisotropy");
options.push_back("hint_albedo");
options.push_back("hint_anisotropy");
options.push_back("hint_black");
diff --git a/servers/rendering/shader_language.h b/servers/rendering/shader_language.h
index 6681af2594..15333839d3 100644
--- a/servers/rendering/shader_language.h
+++ b/servers/rendering/shader_language.h
@@ -179,8 +179,8 @@ public:
TK_FILTER_LINEAR,
TK_FILTER_NEAREST_MIPMAP,
TK_FILTER_LINEAR_MIPMAP,
- TK_FILTER_NEAREST_MIPMAP_ANISO,
- TK_FILTER_LINEAR_MIPMAP_ANISO,
+ TK_FILTER_NEAREST_MIPMAP_ANISOTROPY,
+ TK_FILTER_LINEAR_MIPMAP_ANISOTROPY,
TK_REPEAT_ENABLE,
TK_REPEAT_DISABLE,
TK_SHADER_TYPE,
@@ -322,8 +322,8 @@ public:
FILTER_LINEAR,
FILTER_NEAREST_MIPMAP,
FILTER_LINEAR_MIPMAP,
- FILTER_NEAREST_MIPMAP_ANISO,
- FILTER_LINEAR_MIPMAP_ANISO,
+ FILTER_NEAREST_MIPMAP_ANISOTROPY,
+ FILTER_LINEAR_MIPMAP_ANISOTROPY,
FILTER_DEFAULT,
};