Sodium

Sodium

44M Downloads

Some block models have misaligned textures when many block textures are loaded

Lolothepro opened this issue ยท 3 comments

commented

Bug Description

When many textures are loaded, there is a slight gap on some textures.

Reproduction Steps

Use this modpack :
All the Mods 9 (Modified for Sodium compat and with Frostrealm).zip (Curseforge format)

Give yourself the "frostrealm:frost_crystal_ore" block with the /give @p frostrealm:frost_crystal_ore command.

See the bug

2024-06-27_13 17 28

Textures atlas:

d3rOSNn.md.png

minecraft_textures_atlas_blocks.png.txt

Log File

https://mclo.gs/qKSeZKt

Crash Report

commented

I found the texture. It's the frost_crystal_ore_glow overlay (x=1344 y=5785 w=16 h=16)
You can clearly see the surrounding textures are the ones in the screenshot.
obraz
As you can see the texture position in the atlas is very off grid (probably due to several non-pot and non square textures in the atlas)

I wonder if that's whats causing it.
Maybe changing how textures are packed into the atlas (perhaps even with padding to maintain a perfect 16x16 grid allignment) would fix this.
It would need to be done in such a way as to not drastically increase the size of the atlas tho.

commented

Maybe group textures into several groups during packing

  1. Square & POT =>16px
  2. Non-Square & POT =>16px
  3. Everything else

The third group would be packed into the atlas at the very end so it wouldn't affect the rest of the atlas, and would isolate the precision issues to only the non-pot textures because they deserve it.

commented

2024-11-02_10 54 55

Another example with Supplementaries