SuperLlama88888 / holoprint

Minecraft Bedrock build tool - like Litematica
https://superllama88888.github.io/holoprint/
Other
12 stars 0 forks source link

Duplicate textures in texture atlas #12

Open SuperLlama88888 opened 3 days ago

SuperLlama88888 commented 3 days ago

Occasionally, nearly identical texture fragments can be requested, with the only difference being croppability. However, in the case that the croppable texture fragments is not cropped at all, and is therefore identical to its counterpart, it is not discarded in favour of its counterpart. This causes the image to appear twice in the final texture atlas.

I noticed this testing end portals and end gateways together. End portals have the following texture fragment:

{ "texturePath": "textures/entity/end_portal", "etc": "" ,"croppable": true }

whereas end gateways have:

{ "texturePath": "textures/entity/end_portal", "etc": "" ,"croppable": false }

The following console debug log is then observed:

Cropped part of image textures/entity/end_portal to Object { x: 0, y: 0, w: 1, h: 1 }

The resulting texture atlas looks something like this: atlasfail

This is suboptimal!