Fix Collada material roughness import function 3
Improved readability and further tweaking of function
This commit is contained in:
parent
3b29e85257
commit
0e844f6c91
@ -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) {
|
||||
|
Loading…
Reference in New Issue
Block a user