diff options
author | Aras Pranckevicius <aras_p> | 2022-02-06 22:53:07 +0300 |
---|---|---|
committer | Howard Trickey <howard.trickey@gmail.com> | 2022-02-06 22:53:07 +0300 |
commit | 1d59a7aa777909a75420970d50f27be48c96e150 (patch) | |
tree | 8b83aae698a56b973cad4b9b85a9d2dee0bdf242 /source/blender/io/wavefront_obj/exporter/obj_export_mtl.cc | |
parent | 8be20fcc61137711e0d08031d3807953659f5c0a (diff) |
Fix T95384: new obj exporter inaccurate roughness value in new exporter.
Fixes T95384. New exporter was missing a fix for T94516 that recently got applied to the python exporter.
Also changed the obj export tests code so that when save_failing_test_output is requested and MTL result is different from the golden expectation, it is saved as well, similar to how it's done for the OBJ file result.
Diffstat (limited to 'source/blender/io/wavefront_obj/exporter/obj_export_mtl.cc')
-rw-r--r-- | source/blender/io/wavefront_obj/exporter/obj_export_mtl.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/source/blender/io/wavefront_obj/exporter/obj_export_mtl.cc b/source/blender/io/wavefront_obj/exporter/obj_export_mtl.cc index 48136dad5f7..3637a3f3c5f 100644 --- a/source/blender/io/wavefront_obj/exporter/obj_export_mtl.cc +++ b/source/blender/io/wavefront_obj/exporter/obj_export_mtl.cc @@ -193,8 +193,8 @@ static void store_bsdf_properties(const nodes::NodeRef *bsdf_node, copy_property_from_node(SOCK_FLOAT, bnode, "Roughness", {&roughness, 1}); } /* Empirical approximation. Importer should use the inverse of this method. */ - float spec_exponent = (1.0f - roughness) * 30; - spec_exponent *= spec_exponent; + float spec_exponent = (1.0f - roughness); + spec_exponent *= spec_exponent * 1000.0f; float specular = material->spec; if (bnode) { |