CaffeineMC / sodium-fabric

A Minecraft mod designed to improve frame rates and reduce micro-stutter
Other
4.74k stars 806 forks source link

Show warning when NPOT textures are preventing the use of mip-mapping #2644

Open TheNukeLore opened 1 month ago

TheNukeLore commented 1 month ago

Request Description

When resourcepacks or mods use non-power of two textures, it will drop down the mipmapping level, respectively. However, the only warning is a small warning in the log files; however, this greatly affects the visuals of the game. I request that sodium could do a few potential things, or potentially all:

Should probably list out the packs and textures causing said issues as well.

jellysquid3 commented 1 month ago

Note: I've been told that NeoForge (at least on 1.21?) actually allows NPOT textures to be used, even though it cannot correctly generate mipmaps for them. So we may want to do this only on Fabric for the time being.

djmrFunnyMan commented 1 month ago

I'd support replacing any npot textures with the missing texture to force ppl to make their damn texture packs correctly

jellysquid3 commented 1 month ago

Users don't have any choice in what nonsense their resource packs (or mods) are doing. The most that I'm comfortable with doing is showing a warning similar to the other ones that exist for incompatible resource packs, so that users know why there are problems.

MeeniMc commented 1 month ago

npot assets are already listed in the log (they also ''work as intended'' on fabric, but mip-mapping is broken globally). However the assets are not linked to the resource pack of origin (would be great to know, not always obvious otherwise)

djmrFunnyMan commented 1 month ago

The warning is a good idea. Imo it should also appear after loading in because it's likely people already had the texture packs selected since long ago. The on-load warning should also identify any mods with bad textures and nicely list them for the player (but clearly list out texturepacks and mods separately for user convinience). A small note saying "Please report these issues to the owners of affected mods/texturepacks" so that'll hopefully bring about more pressure to fix those things.

The on-load warning should have a "don't show this again" checkbox, so that it doesn't get annoying.

Also with the warning there should be a small image showing the difference between disabled/enabled mipmapping so users know what they're missing out on (pick out the worst case scenario for mipmaps off like leaves). Majority of players do not know what a "mipmapping" is Something like this: image