IrisShaders / Iris

A modern shaders mod for Minecraft compatible with existing OptiFine shader packs
https://irisshaders.dev
GNU Lesser General Public License v3.0
3.31k stars 625 forks source link

World Curvature causes cubic chunks to be culled/invisible when they shouldn't #1366

Open TBlazeWarriorT opened 2 years ago

TBlazeWarriorT commented 2 years ago

What happened?

Shaderpacks with World Curvature enabled can't seem to render cubic chunks that would otherwise not be directly visible if world curvature was off. The more world curvature, the more chunks get cut from the edge of the screen as Iris doesn't seem to realize they should be there now and just doesn't care about rendering them, leaving missing chunks there.

Screenshots

https://user-images.githubusercontent.com/25572454/163034250-416c2958-e743-4e9b-bea5-e23f4627b50b.mp4 (borrowing Shadowcloud's video from Complementary Discord)

Relevant log output

No response

Minecraft Version

1.18.2

Iris Version

iris-mc1.18.2-1.2.2-build.32.jar

Sodium Version

sodium-fabric-mc1.18.2-0.4.1+build.15.jar

Operating System

Windows 10

What is your GPU?

RTX 2060

Java Version

Bundled (16)

Additional context

No response

douira commented 1 year ago

This is because when frustum culling Iris doesn't know that the shader pack is actually using a different frustum. For this to work the shaderpack either needs to disable frustum culling (I'm not sure if that is entirely possible, if it is it would cause huge performance problems) or a mechanism that somehow tells Iris to use a different frustum when culling needs to be implemented. I'm not sure how this works on Optifine.