Sodium

Sodium

35M Downloads

Performance drop over vanilla renderer when using LambDynamicLights

AeiouEnigma opened this issue ยท 7 comments

commented

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):
LDL-vanilla

Here are the graphs in the same test scenario when using only LambDynamicLights and Sodium:
LDL-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

commented

Does this issue only occur in the alpha builds of Sodium 0.4 or can you also reproduce it with older versions?

commented

(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.

commented

The issue only seems to occur with the alpha builds for 1.18. I just tested in 1.17.1 and found that Sodium substantially outperforms the vanilla renderer in a similar test scenario.

1.17.1 LambDynamicLights without Sodium:
2021-12-09_10 37 11

1.17.1 LambDynamicLights with Sodium:
2021-12-09_10 39 22

commented

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.

commented

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.

commented

This appears to be caused by poor chunk re-building performance, which is a different issue and will be tracked in #1044.

commented

LambDynamicLights is always going to be miserably slow due to how it spams chunk updates to update light values. There is nothing which can really be done to solve this, unless someone implements a shader-based approach for dynamic lights which does not require chunk updates.