1
0
mirror of https://github.com/godotengine/godot.git synced 2026-01-05 19:31:35 +00:00

Fix Collada material roughness import function 4

Made import conversion linear.
This commit is contained in:
Dmitriy Romanov
2018-04-03 22:05:13 +03:00
committed by GitHub
parent 0e844f6c91
commit 0812468d05

View File

@@ -480,7 +480,7 @@ Error ColladaImport::_create_material(const String &p_target) {
}
}
float roughness = (512.0 * (1.0 - Math::sqrt(1.0 - ((Math::log(effect.shininess) / Math::log(2.0)) / 9.0)))) / 503.0;
float roughness = (effect.shininess - 1.0) / 510;
material->set_roughness(roughness);
if (effect.double_sided) {