-
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
Visualize ground atmosphere for 3D TIles/Models #11717
Comments
One note from #11744: right now the Another question is should ground atmosphere be a separate pipeline stage at all? it mainly adds a bit of shader code and at most a couple more uniforms. Maybe renaming the pipeline stage to |
After exploring the globe shader a bit, ground atmosphere and daynight shading are starting to make more sense. The fading logic is a bit complex, so here's a quick summary from
The default fading is a little non-obvious so here's a diagram of the fading curves with increasing camera height from the earth's surface:
Finally, a note about the variable names. It is a bit confusing that we use "fade in/out" as the terminology, though I haven't thought of a better name yet. In practice, they work like this:
|
Oh it looks like I missed one line at the end of So the 4 regions of the diagram are really:
|
Splitting up #4196 into smaller tasks
This task is closely related to #11716, but it focuses on ground atmosphere rather than fog.
In
GlobeFS.glsl
, the globe shader handles both fog and ground atmosphere. In the spirit ofModel
's pipeline stages, I envision this being implemented as aGroundAtmospherePipelineStage
that's separate fromFogPipelineStage
Also, see #11681 (comment) for the proposed
scene.groundAtmosphere
object that will make it easier to propagate settings via theFrameState
and/orAutomaticUniforms
One detail to note: Some details like computing the atmosphere color would be expensive to duplicate if both fog and ground atmosphere are needed for the same model, so it's best to avoid that.
The text was updated successfully, but these errors were encountered: