Skip to content

Commit 3840a53

Browse files
authored
Add comment regarding mtl transparency vs. dissolve values
1 parent 95e0292 commit 3840a53

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

libs/tex/material_lib.cpp

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -28,13 +28,13 @@ MaterialLib::save_to_files(std::string const & prefix) const {
2828

2929
for (Material const & material : *this) {
3030
std::string diffuse_map_postfix = "_" + material.name + "_map_Kd.png";
31-
out << "newmtl " << material.name << std::endl
32-
<< "Ka 1.000000 1.000000 1.000000" << std::endl
33-
<< "Kd 1.000000 1.000000 1.000000" << std::endl
34-
<< "Ks 0.000000 0.000000 0.000000" << std::endl
35-
<< "Tr 0.000000" << std::endl
36-
<< "illum 1" << std::endl
37-
<< "Ns 1.000000" << std::endl
31+
out << "newmtl " << material.name << '\n'
32+
<< "Ka 1.000000 1.000000 1.000000" << '\n'
33+
<< "Kd 1.000000 1.000000 1.000000" << '\n'
34+
<< "Ks 0.000000 0.000000 0.000000" << '\n'
35+
<< "Tr 0.000000" << '\n' // *Tr*ansparancy vs. *d*issolve: Tr = 1.0 - d
36+
<< "illum 1" << '\n'
37+
<< "Ns 1.000000" << '\n'
3838
<< "map_Kd " << name + diffuse_map_postfix << std::endl;
3939
}
4040
out.close();

0 commit comments

Comments
 (0)