-
Notifications
You must be signed in to change notification settings - Fork 3.5k
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
Procedural IBL Enhancement in CesiumJS #12129
Open
ggetz
wants to merge
40
commits into
main
Choose a base branch
from
procedural-ibl
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Conversation
This file contains 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
Thank you for the pull request, @ggetz! ✅ We can confirm we have a CLA on file for you. |
ggetz
commented
Aug 26, 2024
if (defined(uniformMap)) { | ||
const manualUniforms = this._manualUniforms; | ||
len = manualUniforms.length; | ||
for (i = 0; i < len; ++i) { | ||
const mu = manualUniforms[i]; | ||
mu.value = uniformMap[mu.name](); | ||
try { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This update is not strictly necessary, but I found it helpful for debugging.
@jjspace Could you please take a review pass on this? |
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.
Description
This pull request introduces a new system for "procedural" lighting that builds on the Image-Based Lighting (IBL) approach in CesiumJS, aimed at improving the realism and visual quality of the default lighting environment. The changes focus on techniques that create a plausible environment map dynamically based on the current lighting conditions an existing atmospheric scattering code which renders the sky.
Image-Based Lighting Sandcastle
After
Before
Mirror Ball
After
Before
High Altitude Mirror Ball
After
Before
Dynamic Lighting
TODO: More screenshot comparisons
Key Changes
DynamicEnvironmentMapManager
: This new component generates lighting value dynamically based on the existing atmospheric calculations. It uses compute command to generate the following when position or sun position has significantly changed.DynamicEnvironmentMapManager
options accessible via theModel
andCesium3DTileset
only, at least for this PR, mainly due to the performance impact if these values are constantly updated.Additional Updates
ImageBasedLighting.imageBasedLightingFactor
: This property was broken and went unnoticed.ImageBasedLighting.luminanceAtZenith
: This property was removed instead of deprecated because there is no direct equivalent in the new implementation, and is likely not widely used (based on the fact that the above bug went unnoticed).CubeMap
: New utility functions in support of the operations inDynamicEnvironmentMapManager
, such as copying a texture to a specific face.Issue number and link
N/A
Testing plan
Author checklist
DynamicEnvironmentMapManager
options for Model entities?CONTRIBUTORS.md
CHANGES.md
with a short summary of my change