SkyController: refactoring, new simple sky mode, improvements and bug fixes#2790
Open
airnez wants to merge 19 commits into
Open
SkyController: refactoring, new simple sky mode, improvements and bug fixes#2790airnez wants to merge 19 commits into
airnez wants to merge 19 commits into
Conversation
283427a to
f391046
Compare
0498016 to
b1f0adf
Compare
0c509ca to
38d5c2b
Compare
38d5c2b to
7be2992
Compare
Contributor
Author
|
@Desplandis rebased on master and pushed 4 new commits:
|
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.
Description
This PR has to be merged after #2699. It is its follow-up. It answers some of the issues pointed out by #2780.
Major changes
It introduces a new architecture for sky management:
Sky strategies
RealisticSky. It implements the new interfaceISkyStrategy.SimpleSky. It also implementsISkyStrategy. It changes the sky color based on altitude, adds fog to the scene and renders an "atmospheric gradient" to blend the fog with the sky. AskyAltitudeparameter defines when the sky changes color. Fog and horizon gradient are disabled above this value, and their spread is increased when getting closer to the ground.HorizonGradientcode and its shader hold responsability for the atmospheric gradient rendering. It's a full-screen quad rendered on a Mesh. This part was mostly written with LLMs.SkyControllerwas created to handle sky-related logic away from the view. It was named so to avoid confusions withSkyManagerthat was also renamed. It lazy-loads sky strategies, preventing from initializing three-geospatial when not required.SunLight and shadow casting
forceDaytimeoption to the sunLightLayer to make the sun "follow" the camera instead of relying on a Date. The sun is aligned with the camera to display the full globe, and tilts when zooming in to cast shadows nicely.shadowsMaxAltitudeparametershadowsMaxAltitudeparameterMinor changes
Notes
Screenshots
Globe appearance improvements (this branch versus master)
Simple Sky
forceDayTime
Matte 3D tiles mesh
Adjusting aerial perspective blending (this branch versus master)
Mars simple and realistic atmosphere
Debug camera render ignores the sky effects