LambdAurora / LambDynamicLights

A dynamic lighting mod for Minecraft on Fabric Loader.
https://lambdaurora.dev/projects/lambdynamiclights/
Other
412 stars 98 forks source link

Moving and holding a light emitting item causes severe lag #66

Closed catgirldoll closed 12 months ago

catgirldoll commented 3 years ago

Describe the bug When holding an item which produces light and moving, the client experiences massive frametime spikes and no light is visibly cast. When not moving, the frametimes return to normal.

To Reproduce Steps to reproduce the behavior:

  1. launch Minecraft 1.17 with the mods detailed below (only LDL and Fabric)
  2. Hold a light-emitting item
  3. Move
  4. ???
  5. Massive frametime spikes

Screenshots While moving While idle

Desktop:

MeeniMc commented 3 years ago

Same here; other that want to +1 can use the thumbs up to do so on t his comment.

LambdAurora commented 3 years ago

Sadly, I have to say it's expected behavior without Sodium.

The mod severely relies on chunk rebuilding to update the light levels, which asks the game to re-generate the entire chunk geometry. Which takes time and can get very noticeable with mods like this. This mod doesn't optimize in anyway chunk rebuilding. Your only hope is to wait for Sodium.

catgirldoll commented 3 years ago

Ah, that makes sense. The complete lack of emitted light from held items even while standing still should perhaps be a separate issue then!

https://github.com/Kroppeb/sodium-fabric is a Sodium 1.0 port to 1.17 including a bunch of new code which will feature in Sodium 2.0. It's effectively a proof of concept build, but may work for the purpose of optimizing chunk rebuilding. I'll test it later and update this!

Edit: it does indeed reduce the LDL frame time spikes to playable levels.

boasbakker commented 3 years ago

The current sodium build works fine for me

catgirldoll commented 3 years ago

The current sodium build works fine for me

The issue report is regarding 1.17, which to date has no official Sodium builds

boasbakker commented 3 years ago

The current sodium build works fine for me

The issue report is regarding 1.17, which to date has no official Sodium builds

I know. The currect (self compiled) version works fine

MeeniMc commented 3 years ago

Running with Kroppeb Sodium fork completely fixes the issue. It's only a game of patience waiting for Sodium to release for 1.17 then.

edwloef commented 3 years ago

Screenshot from 2021-06-27 17-44-31 I have this issue on 1.17, even with the sodium beta and starlight installed.

boasbakker commented 3 years ago

Screenshot from 2021-06-27 17-44-31 I have this issue on 1.17, even with the sodium beta and starlight installed.

That lag is way less then without sodium

edwloef commented 3 years ago

Keep in mind my baseline fps are about 200, and snessim's were about 60, so the peaks scale down accordingly, and realistically I don't think peaks down to 30fps with a baseline of 200 are normal.

MeeniMc commented 3 years ago

Things are looking great in combination with Sodium B3

JonathanTippy commented 3 years ago

Sadly, I have to say it's expected behavior without Sodium.

The mod severely relies on chunk rebuilding to update the light levels, which asks the game to re-generate the entire chunk geometry. Which takes time and can get very noticeable with mods like this. This mod doesn't optimize in anyway chunk rebuilding. Your only hope is to wait for Sodium.

even with sodium i get very bad fps stuttering (feels like 30fps, very unpleasant.) when moving while holding a torch. setting it to "fast" or "fastest" helps a little, but all it does is make the fps stutters happen slightly less often. i don't understand why this has to cause so much fps stuttering.

Zeryth1 commented 3 years ago

in 1.16.5 with Iris and the sodium fork that comes with it there are no issues, but in 1.17.1 with the same setup, so Iris+sodium it does have this issue on my end. This is with overpowered hardware aswell. https://spark.lucko.me/PuNMxAeo0L https://youtu.be/URgbUliCOpQ

LambdAurora commented 3 years ago

The performance issues should be minimized with latest commits.

Kylstreak commented 1 year ago

Even with sodium installed the issue persists. The weird thing is my frame times are actually much faster with shaders enabled then with shaders disabled.

Sterophonick commented 1 year ago

Bump for issue persists.