Looking at player shadows are causing lag on all shaderpacks
BrtCgn opened this issue ยท 2 comments
What happened?
When i look at anyone's/my own player shadow it drops my FPS more than half, but whenever i stop looking at my player shadow FPS goes back to normal (It happens on every single shaderpack i try).
Screenshots
Log output
No response
Minecraft Version
1.19
Iris Version
iris-mc1.19.1-1.2.6.jar
Operating System
Windows 10
What is your GPU?
Nvidia GTX 1650 Super
Additional context
No response
The performance difference is actually just caused by looking away from the sun. Iris's Advanced Shadow Frustum Culling is most effective when you're looking towards the sun, but it can only cull very little when you are looking in the exact opposite direction of the sun (ie, your own shadow) due to how it works. There's not really a bug here, just a limitation of the current shadow culling methods.
In the future there might be ways to overcome this, however.
Technical information on how the algorithm works can be found here:
The key idea of this algorithm is that if you are looking at the sun, something behind you cannot directly cast a shadow on things visible to you.