-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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 blurring #424
fill blurring #424
Conversation
|
||
for (var i = 0; i < passes; i++) { | ||
|
||
console.log([1 / this.size, 0]); |
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.
console.log
Looks great. But |
Nope, these need to be on the bucket. It pre-renders a blurred texture for the tile once, and just linearly interpolates after that. This follows the -native implementation.
Functions for buckets aren't supported yet
Drawing from the texture on each frame is fast. Its just the first frame that requires some extra processing. Its hard to measure carefully, but it feels fine. I'm not seeing any low-hanging optimizations, and performance concerns will be similar to those on -native. |
@ansis currently the only reason bucket and style properties are separated is that bucket properties are needed when extracting data in a worker. This code doesn't have any worker calculations. Also, native style has them specified in styles: https://github.com/mapbox/mapbox-gl-native/blob/master/bin/style.js#L2070-L2072 |
@mourner you're right about -native having them in the style. I missed that This feels odd to me. All other current style properties can be changed at render time without reprocessing the data, just by tweaking uniforms. Changing the prerender properties means prerendering the tile again. But as you mentioned, the buffers don't need to be reprocessed in the workers. Also, in -native these properties are functions of the tile zoom, not the current zoom, unlike all style properties. What I'm wondering is how special cases like this should change how we deal with the style |
@ansis can you recreate this pull against the dev-pages branch? |
fix Draw.add validation and add tests
Partially ports blurring from -native. Setting the following properties on a fill bucket blurs the fill:
prerender
andprerender-size
can't be functions yet, unlike native. I think we need some deeper thought reorganization here.@mourner quick review?