Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix SH lightmap coefficients for direct lights with packing #103203

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Rudolph-B
Copy link
Contributor

Fixes #102300

This PR changes the SH coefficients used for encoding direct light sources. This requires that the L1 packing method also should be adjusted since it is tightly coupled to the SH coefficients.

L1 packing requires that the L1 coefficients are scaled between 0 and 1. This PR achieves this with a sigmoid function. Specifically the logistics function.

Since the new SH coefficients effectively have no average component (L0 = 0) significant packing artifacts can be seen as only L1 coefficients are packed. I have made some attempts to alleviate this issue but they are still quite prominent.

Dynamic Non-Directional Current Directional PR Directional
image image image image
image image image image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[4.4 Beta 2] Lightmaps too dim when using directional toggle
2 participants