summaryrefslogtreecommitdiff
path: root/scene
diff options
context:
space:
mode:
authorFerenc Arn <tagcup@yahoo.com>2017-10-21 19:35:54 -0400
committerFerenc Arn <tagcup@yahoo.com>2017-10-21 19:35:54 -0400
commitcb0bf1edeae4687c0778f4eb80824f92a7955901 (patch)
treef745dc0228b61201bbd9750a2eee16cea6ce3abc /scene
parent50306041e5be9859bd448fe80a52be45694b6688 (diff)
Rename Schlick GGX to GGX.
Schlick's approximation and GGX are orthogonal concepts. Furthermore, it's usage so far has been inconsistent: we don't even use it with anisotropic SchlickGGX, and Burley (Disney) diffuse does use it while its name doesn't indicate it. The use of Schlick's approximation in Burley and GGX is an implementation detail and doesn't need to be reflected to the namig.
Diffstat (limited to 'scene')
-rw-r--r--scene/resources/material.cpp8
-rw-r--r--scene/resources/material.h2
2 files changed, 5 insertions, 5 deletions
diff --git a/scene/resources/material.cpp b/scene/resources/material.cpp
index 898a594498..b22a019319 100644
--- a/scene/resources/material.cpp
+++ b/scene/resources/material.cpp
@@ -377,7 +377,7 @@ void SpatialMaterial::_update_shader() {
case DIFFUSE_TOON: code += ",diffuse_toon"; break;
}
switch (specular_mode) {
- case SPECULAR_SCHLICK_GGX: code += ",specular_schlick_ggx"; break;
+ case SPECULAR_GGX: code += ",specular_ggx"; break;
case SPECULAR_BLINN: code += ",specular_blinn"; break;
case SPECULAR_PHONG: code += ",specular_phong"; break;
case SPECULAR_TOON: code += ",specular_toon"; break;
@@ -1819,7 +1819,7 @@ void SpatialMaterial::_bind_methods() {
ADD_GROUP("Parameters", "params_");
ADD_PROPERTY(PropertyInfo(Variant::INT, "params_diffuse_mode", PROPERTY_HINT_ENUM, "Burley,Lambert,Lambert Wrap,Oren Nayar,Toon"), "set_diffuse_mode", "get_diffuse_mode");
- ADD_PROPERTY(PropertyInfo(Variant::INT, "params_specular_mode", PROPERTY_HINT_ENUM, "SchlickGGX,Blinn,Phong,Toon,Disabled"), "set_specular_mode", "get_specular_mode");
+ ADD_PROPERTY(PropertyInfo(Variant::INT, "params_specular_mode", PROPERTY_HINT_ENUM, "GGX,Blinn,Phong,Toon,Disabled"), "set_specular_mode", "get_specular_mode");
ADD_PROPERTY(PropertyInfo(Variant::INT, "params_blend_mode", PROPERTY_HINT_ENUM, "Mix,Add,Sub,Mul"), "set_blend_mode", "get_blend_mode");
ADD_PROPERTY(PropertyInfo(Variant::INT, "params_cull_mode", PROPERTY_HINT_ENUM, "Back,Front,Disabled"), "set_cull_mode", "get_cull_mode");
ADD_PROPERTY(PropertyInfo(Variant::INT, "params_depth_draw_mode", PROPERTY_HINT_ENUM, "Opaque Only,Always,Never,Opaque Pre-Pass"), "set_depth_draw_mode", "get_depth_draw_mode");
@@ -2006,7 +2006,7 @@ void SpatialMaterial::_bind_methods() {
BIND_ENUM_CONSTANT(DIFFUSE_OREN_NAYAR);
BIND_ENUM_CONSTANT(DIFFUSE_TOON);
- BIND_ENUM_CONSTANT(SPECULAR_SCHLICK_GGX);
+ BIND_ENUM_CONSTANT(SPECULAR_GGX);
BIND_ENUM_CONSTANT(SPECULAR_BLINN);
BIND_ENUM_CONSTANT(SPECULAR_PHONG);
BIND_ENUM_CONSTANT(SPECULAR_TOON);
@@ -2087,7 +2087,7 @@ SpatialMaterial::SpatialMaterial()
flags[i] = 0;
}
diffuse_mode = DIFFUSE_LAMBERT;
- specular_mode = SPECULAR_SCHLICK_GGX;
+ specular_mode = SPECULAR_GGX;
for (int i = 0; i < FEATURE_MAX; i++) {
features[i] = false;
diff --git a/scene/resources/material.h b/scene/resources/material.h
index 2425f1a174..942fb42363 100644
--- a/scene/resources/material.h
+++ b/scene/resources/material.h
@@ -193,7 +193,7 @@ public:
};
enum SpecularMode {
- SPECULAR_SCHLICK_GGX,
+ SPECULAR_GGX,
SPECULAR_BLINN,
SPECULAR_PHONG,
SPECULAR_TOON,