diff options
author | Juan Linietsky <reduzio@gmail.com> | 2017-10-01 19:08:49 -0300 |
---|---|---|
committer | Juan Linietsky <reduzio@gmail.com> | 2017-10-01 19:08:49 -0300 |
commit | c9a925c4e0e226b168f05b1d54b1050437869b5e (patch) | |
tree | 44442c56339486e62aa2a39893f7f1d088fd92a5 /scene | |
parent | d10e5eabedcdbcbb3b2854ed27b50b756a771b73 (diff) |
Switched Burley/Lambert, and restored diffuse term to 0-1 range for compatibility.
Diffstat (limited to 'scene')
-rw-r--r-- | scene/resources/material.cpp | 6 | ||||
-rw-r--r-- | scene/resources/material.h | 2 |
2 files changed, 4 insertions, 4 deletions
diff --git a/scene/resources/material.cpp b/scene/resources/material.cpp index da0f522ff3..2936df7a51 100644 --- a/scene/resources/material.cpp +++ b/scene/resources/material.cpp @@ -370,10 +370,10 @@ void SpatialMaterial::_update_shader() { case CULL_DISABLED: code += ",cull_disabled"; break; } switch (diffuse_mode) { + case DIFFUSE_BURLEY: code += ",diffuse_burley"; break; case DIFFUSE_LAMBERT: code += ",diffuse_lambert"; break; case DIFFUSE_LAMBERT_WRAP: code += ",diffuse_lambert_wrap"; break; case DIFFUSE_OREN_NAYAR: code += ",diffuse_oren_nayar"; break; - case DIFFUSE_BURLEY: code += ",diffuse_burley"; break; case DIFFUSE_TOON: code += ",diffuse_toon"; break; } switch (specular_mode) { @@ -1809,7 +1809,7 @@ void SpatialMaterial::_bind_methods() { ADD_PROPERTYI(PropertyInfo(Variant::BOOL, "vertex_color_is_srgb"), "set_flag", "get_flag", FLAG_SRGB_VERTEX_COLOR); ADD_GROUP("Parameters", "params_"); - ADD_PROPERTY(PropertyInfo(Variant::INT, "params_diffuse_mode", PROPERTY_HINT_ENUM, "Lambert,Lambert Wrap,Oren Nayar,Burley,Toon"), "set_diffuse_mode", "get_diffuse_mode"); + 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_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"); @@ -1991,10 +1991,10 @@ void SpatialMaterial::_bind_methods() { BIND_ENUM_CONSTANT(FLAG_TRIPLANAR_USE_WORLD); BIND_ENUM_CONSTANT(FLAG_MAX); + BIND_ENUM_CONSTANT(DIFFUSE_BURLEY); BIND_ENUM_CONSTANT(DIFFUSE_LAMBERT); BIND_ENUM_CONSTANT(DIFFUSE_LAMBERT_WRAP); BIND_ENUM_CONSTANT(DIFFUSE_OREN_NAYAR); - BIND_ENUM_CONSTANT(DIFFUSE_BURLEY); BIND_ENUM_CONSTANT(DIFFUSE_TOON); BIND_ENUM_CONSTANT(SPECULAR_SCHLICK_GGX); diff --git a/scene/resources/material.h b/scene/resources/material.h index cf190f0921..c0e007ac5f 100644 --- a/scene/resources/material.h +++ b/scene/resources/material.h @@ -185,10 +185,10 @@ public: }; enum DiffuseMode { + DIFFUSE_BURLEY, DIFFUSE_LAMBERT, DIFFUSE_LAMBERT_WRAP, DIFFUSE_OREN_NAYAR, - DIFFUSE_BURLEY, DIFFUSE_TOON, }; |