diff options
author | Dmitriy Romanov <dimonasdf@inbox.ru> | 2018-03-31 12:50:03 +0300 |
---|---|---|
committer | Dimonasdf <dimonasdf@inbox.ru> | 2018-03-31 13:44:46 +0300 |
commit | 0e844f6c91dfc421c573c6ab784e2a96903413e3 (patch) | |
tree | e87144298372cf6ae09f1f03a2edaea01092daf1 /editor | |
parent | 3b29e85257d68b5ce4834aa756a5d1fc62dd82c7 (diff) |
Fix Collada material roughness import function 3
Improved readability and further tweaking of function
Diffstat (limited to 'editor')
-rw-r--r-- | editor/import/editor_import_collada.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/editor/import/editor_import_collada.cpp b/editor/import/editor_import_collada.cpp index 2a2fd4ef8a..282da239cc 100644 --- a/editor/import/editor_import_collada.cpp +++ b/editor/import/editor_import_collada.cpp @@ -480,7 +480,7 @@ Error ColladaImport::_create_material(const String &p_target) { } } - float roughness = -Math::sqrt(1.0 - ((Math::log(effect.shininess) / Math::log(2.0)) / 9.0)) + 1; + float roughness = (512.0 * (1.0 - Math::sqrt(1.0 - ((Math::log(effect.shininess) / Math::log(2.0)) / 9.0)))) / 503.0; material->set_roughness(roughness); if (effect.double_sided) { |