egg2pg: Slight cleanup

[skip ci]
This commit is contained in:
rdb 2022-01-10 15:40:06 +01:00
parent 6fe21fd8bd
commit 440b2c48b8

View File

@ -162,18 +162,17 @@ fill_state(EggPrimitive *egg_prim) {
// transform, never bake it in. In fact, we don't even care about its // transform, never bake it in. In fact, we don't even care about its
// UV's in this case, since we won't be using them. // UV's in this case, since we won't be using them.
tex_mat_attrib = apply_tex_mat(tex_mat_attrib, def._stage, egg_tex); tex_mat_attrib = apply_tex_mat(tex_mat_attrib, def._stage, egg_tex);
}
} else { else {
/* // Otherwise, we need to record that there is at least one texture on
* Otherwise, we need to record that there is at least one texture on this // this particular UV name and with this particular texture matrix.
* particular UV name and with this particular texture matrix. If there are // If there are no other textures, or if all of the other textures use
* no other textures, or if all of the other textures use the same texture // the same texture matrix, then tex_mats[uv_name].size() will remain
* matrix, then tex_mats[uv_name].size() will remain 1 (which tells us we can // 1 (which tells us we can bake in the texture matrix to the UV's).
* bake in the texture matrix to the UV's). On the other hand, if there is // On the other hand, if there is another texture on the same uv name
* another texture on the same uv name but with a different transform, it will // but with a different transform, it will increase
* increase tex_mats[uv_name].size() to at least 2, indicating we can't bake // tex_mats[uv_name].size() to at least 2, indicating we can't bake in
* in the texture matrix. // the texture matrix.
*/
tex_mats[uv_name][egg_tex->get_transform3d()].push_back(&def); tex_mats[uv_name][egg_tex->get_transform3d()].push_back(&def);
} }
} }