-
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
Globe translucency #8726
Merged
Merged
Globe translucency #8726
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
…t any commands in the TRANSLUCENT pass
IanLilleyT
approved these changes
May 26, 2020
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 PR really shows how complicated transparency can be with all the different edge cases it introduces, but the code is pretty well isolated and I didn't see any problems in the sandcastles. Thanks @lilleyse!
This was referenced Jun 12, 2020
This was referenced Mar 4, 2021
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.
For #5665
Fixes #5163
Fixes #7257
Fixes #8752
This PR adds the ability to set translucency on the globe surface. Translucency takes into account the globe's material, imagery layers, and base color, as well as new options
frontFaceAlpha
andfrontFaceAlphaByDistance
for front faces andbackFaceAlpha
andbackFaceAlphaByDistance
for back faces.Most of the work happens in a new file
GlobeTranslucency
. It creates derived commands for globe commands and maintains a framebuffer for rendering classification primitives. I tried to design the code so that it would work for classification primitive on 3D Tiles in the future. I also tried to make the globe translucency logic as invasive in other files as possible, but some logic does slip through inGlobe
,GlobeSurfaceTileProvider
, andScene
.There are also a few miscellaneous fixes in here.
depthTestAgainstTerrain
was false.Globe translucency affects a lot of systems and I tried to test as many configurations as I could think of. I enabled globe translucency in every Sandcastle to help discover bugs, but mainly I tested with these two sandcastles: sandcastle1 sandcastle2. My checklist so far is:
depthTestAgainstTerrain
,pickTranslucentDepth
, HDR workTo do:
translucent
property is false and the primitive is being rendered in the opaque pass and writing depth that obstructs the translucent globe.Globe translucency sandcastle
Drawing on translucent terrain
Checker material sandcastle
@gberaudo @fredj