Skip to content
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

Fill poles #42

Merged
merged 33 commits into from
May 31, 2012
Merged

Fill poles #42

merged 33 commits into from
May 31, 2012

Conversation

bagnell
Copy link
Contributor

@bagnell bagnell commented May 25, 2012

Fill the poles in screen space.

  • Create a viewport quad over each pole.
  • Attach the texture that the tiles were drawn to.
  • In the fragment shader:
    • If the same fragment in the texture was drawn to, discard.
    • If the ray through the fragment doesn't intersect the ellipsoid, discard.
    • Use the ray/ellipsoid intersection to compute the position, normal and fragment color, similar to how tiles are shaded.

@ghost ghost assigned pjcozzi May 25, 2012
@bagnell bagnell mentioned this pull request May 25, 2012
@pjcozzi
Copy link
Contributor

pjcozzi commented May 25, 2012

Looks good, except for a couple of issues:

  • The north pole is black when zoomed out, then shaded when zoomed in. Is this due to the ground atmosphere turning off? It is only the north pole in the Skeleton, but both poles in the Sandbox, I assume because of the difference in the sun position.
  • There are cracks between the pole cap and the tiles below it from a horizon view once you cross over the pole.

Also, please update CHANGES.md.

@shunter
Copy link
Contributor

shunter commented May 30, 2012

You should use the new Extent object everywhere an extent is used. For example, Tile.extent, Tile.tileXYToExtent, maxExtent in all the TileProviders and CentralBody.

@pjcozzi
Copy link
Contributor

pjcozzi commented May 31, 2012

@bagnell Let me know when this is ready for me to have another look. Also, do you need to test on my AMD card today?

@pjcozzi
Copy link
Contributor

pjcozzi commented May 31, 2012

Don't forget to update CHANGES.md.

occluded = (occludeePoint && !state.occluder.isVisible(new BoundingSphere(occludeePoint, 0.0))) || !state.occluder.isVisible(boundingVolume);

if (frustumCull || occluded) {
this._vaNorthPole = this._vaNorthPole && this._vaNorthPole.destroy();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why destroy the north and south poles here? They use a trivial amount of memory, and it runs the risk of shader recompiles when the poles come in and out of view.

@bagnell
Copy link
Contributor Author

bagnell commented May 31, 2012

I added the final changes based on review. Ready for the merge.

@pjcozzi
Copy link
Contributor

pjcozzi commented May 31, 2012

Very nice. Merge in master, then I'll merge this back to master.

@bagnell
Copy link
Contributor Author

bagnell commented May 31, 2012

I merged master and fixed the broken tests and examples.

pjcozzi added a commit that referenced this pull request May 31, 2012
@pjcozzi pjcozzi merged commit 5726b02 into master May 31, 2012
mramato added a commit that referenced this pull request Oct 22, 2015
oterral pushed a commit to oterral/cesium that referenced this pull request Oct 31, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants