embeddium icon indicating copy to clipboard operation
embeddium copied to clipboard

Lucent lighting flickers slightly

Open KittyNath opened this issue 1 year ago • 2 comments

Bug Description

Lucent provides dynamic lights (light emitted from holding a torch, etc). With Embeddium installed, the dynamic light source snaps to center of the block instead of following the player smoothly. This behaviour doesn't change with adding Embeddium++ and Oculus. Lucent settings: smoothBlending enabled, threadedRendering both enabled and disabled tested

Reproduction Steps

  1. Install both Lucent and Embeddium on Forge 1.20.1
  2. hold a torch in a dark cave
  3. walk around and observe the jank

Log File

latest.log debug.log

KittyNath avatar Mar 17 '24 10:03 KittyNath

This is likely caused by Lucent using 8 bits to store the rendered light value. Vanilla only uses the top 4 bits, and many of the functions in vanilla that interact with the lightmap also assume 4-bit values.

This cannot be fixed before we stop remaining compatible with Sodium 0.5.8 addons, as it requires making a major change to Embeddium's light code that will break Indium at the very least, and likely other add-ons.

In my testing with a standalone instance, the light blending is still smooth enough to be tolerable even with this limitation.

embeddedt avatar Mar 17 '24 14:03 embeddedt

I spent some more time investigating this today, and I'm not sure it's worth fixing, especially since Forge's own lighting pipeline (when enabled) also makes the assumption that only 4 bits matter, and thus has the same flickering problem. If we do opt to fix this, it will likely be in 1.21 or later.

embeddedt avatar Apr 30 '24 18:04 embeddedt