Performance drop over vanilla renderer when using LambDynamicLights
AeiouEnigma opened this issue ยท 7 comments
Version information
mc1.18-0.4.0-alpha5+build.9
Expected Behavior
Performance (FPS) should be at least as high with sodium as without sodium
Actual Behavior
Using Sodium together with LambDynamicLights results in a severe framerate drop compared to using LambDynamicLights without Sodium.
Here are my Alt+F3 performance graphs in a test scenario when using only LambDynamicLights (vanilla renderer):
Here are the graphs in the same test scenario when using only LambDynamicLights and Sodium:
Reproduction Steps
Install LambDynamicLights and Sodium.
Enter a world and run around with dynamic lights. Fly over the surface of an ocean with a bunch of glow squid for a more noticeable result.
Java version
Java 17
CPU
Intel Core i5-8400
GPU
NVIDIA GTX 1060 (6GB)
Additional information
LambDynamicLights version 2.1.0
Does this issue only occur in the alpha builds of Sodium 0.4 or can you also reproduce it with older versions?
(Install Mod Menu for the steps given below to change the mod settings in game)
Turning off "Water Sensitivity Check" in LambDynamicLights config improves the fps by a lot when near water bodies, though that would make it so that some light sources that shouldn't emit light in water will emit light, but it's totally fine for me.
Fps also drops in the nether when in Basalt Deltas, I just usually disable LambDynamicLights for a while then because there is a lot of light around anyway.
Even though my reply is 25 days after the issue was reported, it's so you can still use LambDynamicLights with Sodium without using any bleeding edge build fixing the issue, however I hope a new release is on the way soon.
At first I thought that Sodium 0.4 had pretty bad performance but it turns out it was this performance regression. It can be noticed even with very few dynamic lights like holding a torch and a few mobs being on fire. Without dynamic lights on Sodium 0.4 actually runs really well. I only needed to drop my render distance a few chunks down from 28 to get the same performance as I had on sodium 0.3.3.
This might be resolved with #1026 as we had a number of regressions in our biome blending code caused by the quick changes to get it working in MC 1.18.
This appears to be caused by poor chunk re-building performance, which is a different issue and will be tracked in #1044.