-
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
#define
out water effect code for tiles that are entirely land.
#2261
Conversation
`SHOW_REFLECTIVE_OCEAN` and `SHOW_OCEAN_WAVES` have moved into the `GlobeSurfaceShaderSet` so they can vary on a per-tile basis, rather than being set identically for all tiles. Tiles that are entirely land now use `undefined` for their water mask texture instead of a shared "land" texture.
Very nice. Any before/after performance numbers? |
Assuming the performance win is non-trivial, we should mention this in CHANGES.md. |
On my 9800GT, GPU usage, measured with Process Explorer, for a horizon view facing North at Seneca Rocks drops from around 60% to 50%. |
I should add, that's when using the heightmap terrain with water masks, of course. |
What about top-down view all land vs. all water before and after? |
var sampler = context.createSampler({ | ||
wrapS : TextureWrap.CLAMP_TO_EDGE, | ||
wrapT : TextureWrap.CLAMP_TO_EDGE, | ||
minificationFilter : TextureMinificationFilter.LINEAR, |
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.
I hope the driver would optimize for this 1x1 case, but I would still go with NEAREST
here.
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.
Actually, this sampler is only used for the non-1x1 tiles. The allWaterTexture
doesn't specify a sampler.
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.
Ah, OK.
@kring do you want to look at this? |
Tests and terrain/water rendering are good on Mac in Chrome and Firefox. |
top-down view, all land, ~47% before, ~36% after. top-down view, all water, North Pole, same ~60% before and after. |
Very nice. |
All looks good to me, thanks Scott! I don't see any comments that need addressing, so I'm merging. |
`#define` out water effect code for tiles that are entirely land.
SHOW_REFLECTIVE_OCEAN
andSHOW_OCEAN_WAVES
have moved into theGlobeSurfaceShaderSet
so they can vary on a per-tile basis, rather than being set identically for all tiles. Tiles that are entirely land now useundefined
for their water mask texture instead of a shared "land" texture.This is a roadmap item in #526.