-
Notifications
You must be signed in to change notification settings - Fork 3.6k
Added a property for setting the amount of the vertex shadow attenuat… #10914
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
Added a property for setting the amount of the vertex shadow attenuat… #10914
Conversation
…ion when terrain lighting is enabled (by dafult it is set to a fixed value, 0.3)
Thanks for the pull request @calogeromauceri!
Reviewers, don't forget to make sure that:
|
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.
Thanks @calogeromauceri for the PR!
This is working well! I have a couple comments, then @sanjeetsuhag would you be able to take a pass on the globe shader changes?
@ggetz, @sanjeetsuhag thanks for your feedback. I just pushed the changes you suggested. Please let me know if anything else is needed |
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.
@calogeromauceri Using a uniform
is working great. However, there's still some cleanup needed since the changes to GlobeSurfaceShaderSet
are no longer needed.
@sanjeetsuhag I just pushed the changes you suggested. Please let me know if anything else is needed |
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.
Thanks for your patience with the review, @calogeromauceri. The changes look good! Thanks again!
@sanjeetsuhag thanks to you for the great support, guidelines and responsiveness! |
Fixes #10913
Added an option to
Globe
(Globe.vertexShadowDarkness
) for changing the amount of the terrain vertex shadow darkness when lighting is enabled (Globe.enableLighting
). Similarly toShadowMap.darkness
parameter, a value near 0 makes the shadows darker, increasing it makes the shadows brighter. The default value is 0.3 (that was hard coded in Cesium).Having the ability to change the terrain vertex shadow darkness allows to create more realistic shadows for cases, like the Moon, where there is no atmosphere and the light contribution from other sources (sun or earth) can be very small.
Here is a sandcastle example with default terrain vertex shadow darkness (current behaviour, advance the time in timeline till the terrain is fully shadowed)
sandcastle
here is a sandcastle example with the new parameter for changing the terrain vertex shadow darkness
sandcastle
The parameter can be dynamically changed, as visible in this example
sandcastle