Improve performance for horizon views. #24

Merged
merged 16 commits into from May 17, 2012

Projects

None yet

2 participants

@bagnell
Member
bagnell commented May 14, 2012
  • Changes how tiles are prepared for rendering. When traversing the quad-tree, stop at highest resolution tile available and load higher resolution tiles if necessary.
  • For horizon views, estimate the number of pixels the tile will contribute and use lower resolution tiles if it is not significant.
@pjcozzi

Why don't tiles always have a state?

@pjcozzi

Instead of using random colors, pull the colors from a predefined color ramp (you can set a reasonable limit for maxZoom so the ramp is finite). This way the colors are the same from run to run, which is useful for experimenting, comparing screen shots, etc.

@pjcozzi

Can maxZoom be negative? zero? Throw a DeveloperError.

@pjcozzi

Why code, and not @link?

@pjcozzi

Isn't is conceptually more direct to derive this from maxZoom, not the images?

@pjcozzi

Why not @link? Also, I'm not sure if it is a best practice, but I generally make the text for the @exception and DeveloperError the same.

@pjcozzi

We append .0 to whole numbers when they are used as floating-point. 1 -> 1.0. 2 -> 2.0. This is for human readers, not JavaScript.

Also, based on the comment, should any of the arguments be exposed? Would a user be likely to configure this?

Member

Actually, is this something we are going to change when refinement is also driven by geometric detail? If so, I wouldn't expose anything yet.

@pjcozzi

Put one per line. @shunter had a good reason recently, but it slipped my mind.

@pjcozzi

normalize defaults to false so you can omit it.

@pjcozzi

Are you ever going to use more than 64K vertices for a tile? I believe we'll see a WebGL extension for 32-bit indices soon, but I'm not sure that we'll want to rely on it; I'd rather subdivide the tile unless the batch breaking hurts performance.

@pjcozzi

normalize defaults to false.

@pjcozzi
Member

Any noticeable performance improvement/impact for various view paths?

@bagnell
Member
bagnell commented May 16, 2012

I committed and reverted changes to refine tiles based on viewing angles so that the work can be continued in the future. I also committed a change based on @pjcozzi 's comments above.

@pjcozzi

Why use i? Why not x - and then avoid * maxZoom?

@pjcozzi pjcozzi merged commit 505cec5 into master May 17, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment