Iris Shaders

Iris Shaders

38M Downloads

Certain textures render wrong at a distance (mipmapping issue?)

Spleenczar opened this issue ยท 5 comments

commented

What happened?

Some textures (specifically glass panes and leaves that I've found) have some sort of rendering issue at a distance. The effect is most noticeable with glass panes, where the entire top face disappears. There also appears to be a

Screenshots

Without Iris:
2023-06-25_20 16 16
With Iris:
2023-06-25_20 16 51

Log output

latest.log

Minecraft Version

1.20.1

Iris Version

1.6.4

Operating System

Windows 10

What is your GPU?

Nvidia GeForce RTX 2080 Ti

Additional context

The effect is more noticeable in motion, can provide a video if it isn't clear what the issue is from the screenshots. There is also a very slight darkness across the background without Iris that is gone with Iris - it's only really noticeable when you flick between the screenshots since it's so subtle, but it might be a related issue.

commented

The glass pane top seems to be a mipmapping issue in Iris, as Sodium is identical to vanilla. The problem here is that the glass pane top is a texture that's only 2px wide, so as the texture resolution is reduced it can either turn to mush or disappear.

Here's vanilla/sodium's mipmap levels for the pane top texture:

all-glass_pane_top-sodium

Here's Iris:

all-glass_pane_top-iris

These are from the dumped texture atlases of the same versions of the mods in your report (MC 1.20.1 / Iris 1.6.4 / Sodium 0.4.10.) I added the white background so they'd be visible as otherwise they're almost completely transparent at the lower levels.

Seems like probably a bug or unintended. I originally was going to suggest maybe a 32x texture pack like Faithful, but I tried it and it's really not much better:

all-glass_pane_top-iris-32x

Probably going to need to wait for a fix. You could also set mipmap level to 1 or 0, but that's gonna cause the rest of the game to look like absolute vomit.

About the leaves, it's my understanding (and I could be wrong) that Sodium doesn't do mipmapping on leaves for performance reasons. To work around that -- and make all distant objects a lot better looking, not just leaves -- you can use a mod like ResolutionControl+. This lets you run the game at a higher internal resolution (like 1.5x or 2x) and then downscale for your monitor after everything is rendered.

This costs performance but if you're playing w/shaders disabled you should have more than enough horsepower. With shaders you'll want to set ResolutionControl+ back to 1x unless you like generating lots of GPU heat and low FPS numbers.

That's the best compromise I've personally found to making distant objects look good and not horribly aliased.

commented

Sodium does mipmapping on leaves.
About Iris, Iris implements an enhanced mipmapping feature from Optifine, could you confirm if it happens there?

commented

OptiFine's mipmaps look pretty good:

all-glass_pane_top-optifine

This is preview_OptiFine_1.20.1_HD_U_I5_pre6.jar if it matters.

commented

Screenshot comparisons, Iris:

OptiFine:

commented

Just realized that Iris' color values are correct, it's only the alpha that's wrong. If you remove all the alpha, it looks like OptiFine:

iris-mipmap-alpharemove

The fact that it gets progressively more transparent with each level implies that there is some error in the alpha calcs that gets propagated each time.