TexTools / xivModdingFramework

GNU General Public License v3.0
9 stars 16 forks source link

Fix the model preview not always rendering parts assigned to row 0 #33

Closed KoraLyn closed 3 years ago

KoraLyn commented 3 years ago

With 4k texture maps or when map sizes differed from one another the model preview wouldn't render parts of the model that were assigned to colourset row 0. This ended up being due to ImageSharp premultiplying the RGB component by the alpha component which in this case meant a multiplication by 0. As a result the RGB values for the pixels of the normal map with an alpha of 0 ended up as (0,0,0) as well.

Related issue: https://github.com/SixLabors/ImageSharp/issues/1498#issuecomment-757519563

Changes: