Fix faint lightshafts when Voxy/Distant Horizons is enabled#316
Open
aLink536 wants to merge 1 commit into
Open
Fix faint lightshafts when Voxy/Distant Horizons is enabled#316aLink536 wants to merge 1 commit into
aLink536 wants to merge 1 commit into
Conversation
When VOXY or DISTANT_HORIZONS is defined, maxDistance was set to renderDistance * 0.5 for all pixels. The weight accumulation normalizes against maxDistance, so with a large LOD render distance (e.g. 512 chunks) geometry at vanilla render distance only accumulated ~4% of the expected weight, making lightshafts appear very faint. Fix: keep maxDistance = far * 0.98 for non-sky pixels so weight normalization is identical to vanilla behaviour. Only sky pixels that need to trace into the LOD zone use loddedMaxDistance, where the extended distance is appropriate and weights still integrate correctly to 1.0.
2af46d3 to
3685b73
Compare
Author
Member
|
Thank you for trying to help, but this is intentional. Extreme light shafts make lods invisible and most people don't like that. |
Author
|
@EminGT May be worth tweaking this further, in some cases even on extreme the rays are not visible with Voxy enabled. I'd look at adding a more granular 'strength' setting so people can find the balance that works for them - benefits non voxy users as well. Voxy enabled with my fix - (ingame time changed is why light shafts have moved): |
Member
|
Hm, the Extreme setting wasn't supposed to change with Voxy. That's an issue |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.





What's the issue
When Voxy or Distant Horizons is enabled, lightshafts appear very faint — sometimes nearly invisible depending on how large the LOD render distance is set.
Root cause
In
volumetricLight.glsl, the Voxy/DH branch setsmaxDistance = renderDistance * 0.5for all pixels. The weight accumulation normalises againstmaxDistance:With a large LOD render distance (e.g. 512 chunks →
maxDistance = 4096), a ray that stops at vanilla geometry (~192 blocks) only accumulates ~4% of the expected weight. The effect scales badly — the larger the Voxy render distance the user has set, the fainter the shafts.Fix
Decouple the weight-normalisation distance from the LOD extension distance:
maxDistance = far * 0.98— weight normalisation is identical to non-Voxy behaviour, so lightshafts are full brightness regardless of LOD render distance setting.loddedMaxDistance = max(renderDistance * 0.5, far * 0.98)— the ray still extends into the LOD zone and weights correctly integrate to 1.0.Files changed
shaders/lib/atmospherics/volumetricLight/volumetricLight.glsl