Sodium

Sodium

44M Downloads

Try to preserve mipmapping as much as possible.

djmrFunnyMan opened this issue ยท 2 comments

commented

Request Description

I assume this would complicate the mipmapping code greatly but I think it'd be worth it since it'll greatly improve the visuals for end users and shield them from the errors of mod and texturepack devs.

I have some ideas on how this could be done. If they're bad ignore them (I have no idea what I'm talking about) but don't discard the feature request because of them, I'll just edit them out and leave only the short description.

  1. If there's a low power of 2 texture, make duplicate mipmaps for it instead of lowering the mip levels. So for example, if there's an 4x4 texture, instead of lowering all mipmaps to 2x just have it use the same resolution for levels 0,1,2 and then generate mips normally for 3 and 4

So it'd look like this, for 8x8, 4x4 and 2x2 textures (and16x16 for reference)

  • level 0 8x8, 4x4, 2x2 (16x16)
  • level 1 8x8, 4x4, 2x2 (8x8)
  • level 2 4x4, 4x4, 2x2 (4x4)
  • level 3 2x2, 2x2, 2x2 (2x2)
  • level 4 1x1, 1x1, 1x1 (1x1)
  1. For NPOT textures idk. Maybe force them into a separate "npot atlas" so while they won't have mipmapping they won't break it globally.
commented

As the creator of Legacy Mipmaps, I've had to study how Java and other versions of MC create their mipmapping. In reality, it is better to add more mipmapping levels for higher resolution textures rather than trying to add more atlases specifically for a singular texture that is smaller than the rest (or even bigger).

Every sprite is on an atlas and is mipmapped before being put on that atlas (iirc). If you try to make a singular sprite use a different mipmapping level than other sprites, then that sprite would be significantly bigger on the atlas than all others. trying to get this to work would require severely altering how mipmapping and atlases are made which would break a lot of things.

It's a cool suggestion, but it doesn't have much of a benefit for performance and could do more harm than good

commented

Better Mipmaps can offer texture upscaling and support for high resolution textures (up to 1024x).