tangrams / walkabout-style

Preview map:
https://tangrams.github.io/walkabout-style
MIT License
32 stars 14 forks source link

Simplify spheremap shaders #177

Closed bcamper closed 7 years ago

bcamper commented 7 years ago

This simplifies the spheremap shader to avoid the eye / reflections calculations, which it turns out can be avoided because we are using a simplified concept of environment map where the "eye" is always looking straight down.

It also reduces shader duplication by using mix and moving a parameter into a uniform (u_zoom_scale). Because Tangram now shares source-identical program objects, this will avoid an additional program compile.

bcamper commented 7 years ago

cc @matteblair @tallytalwar let's try this on Tizen too

bcamper commented 7 years ago

Differ test looks good (no change):

http://tangrams.github.io/differ/?1=https://github.com/tangrams/walkabout-style/blob/gh-pages/walkabout-style.yaml&2=https://github.com/tangrams/walkabout-style/blob/simplify-spheremap/walkabout-style.yaml&lib1=0.12&lib2=&go

nvkelso commented 7 years ago

LGTM after verifying browsing the map.