diff options
author | Aras Pranckevicius <aras@nesnausk.org> | 2022-07-07 11:32:56 +0300 |
---|---|---|
committer | Aras Pranckevicius <aras@nesnausk.org> | 2022-07-07 11:34:13 +0300 |
commit | bddcb89cdaa6d9b36b3e42547a95bff792d37610 (patch) | |
tree | d14068212e05d3831a64da5037379b40324da6ce /source | |
parent | 28105caaa394b5a6c3d237fea7ddadecca7d0331 (diff) |
OBJ: always set eevee blend mode when material "d" is below 1.0
Fixes T97743: the import code was setting EEVEE blending mode whenever
a transparency texture was present (map_d), or when the materials
illum was saying "yo, transparency!". But if only the material's d
was below 1.0, it was not setting the blend mode, which is different
to user expectations.
Differential Revision: https://developer.blender.org/D15383
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/io/wavefront_obj/importer/obj_import_mtl.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/source/blender/io/wavefront_obj/importer/obj_import_mtl.cc b/source/blender/io/wavefront_obj/importer/obj_import_mtl.cc index f39def0a4af..60e419728f3 100644 --- a/source/blender/io/wavefront_obj/importer/obj_import_mtl.cc +++ b/source/blender/io/wavefront_obj/importer/obj_import_mtl.cc @@ -320,7 +320,7 @@ void ShaderNodetreeWrap::set_bsdf_socket_values(Material *mat) if (alpha != -1) { set_property_of_socket(SOCK_FLOAT, "Alpha", {alpha}, bsdf_); } - if (do_tranparency) { + if (do_tranparency || (alpha >= 0.0f && alpha < 1.0f)) { mat->blend_method = MA_BM_BLEND; } } |