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

Reworked the Webgl Heatmap layer & associated utilities #9041

Merged
merged 7 commits into from Dec 7, 2018

Conversation

jahow
Copy link
Contributor

@jahow jahow commented Dec 6, 2018

This PR aims to fix #9014 for good & generally improve the webgl-related classes.

Now the Heatmap layer should be much more resemblant to the original implementation, but with better performance overall.

Also the API of the Webgl Points renderer is now more powerful, with callbacks for opacity, rotation lock and texture coords (more examples to come).

The glitches have been removed by properly handling premultiplied alpha, which wasn't the case before. As layers are individual DOM elements, handling transparency on each of them is mandatory but this can be tricky with WebGL. Now things should be working consistently in any browser inc. in the CI.

This PR:
image

5.3.0:
image

Some expected attributes might not end up in the compiled shader. In this case, skip calling enableVertexAttrib
Now opacity, rotateWithView and tex coords can be set with callbacks per feature.
Now the layer opacity is simply handled by a CSS property on the layer DOM element. As such it does not have to be
taken into account in shaders.
Things done:
- stay closer to the original rendering in canvas
- get rid of the intermediary blur step
- use the new callbacks in the webgl points renderer
- premultiply alpha in the last postprocessing step
Copy link
Member

@ahocevar ahocevar left a comment

Choose a reason for hiding this comment

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

Thanks @jahow for your continued work on this. Looks great now!

@ahocevar ahocevar merged commit 30947c0 into openlayers:master Dec 7, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Issues with ol/layer/Heatmap
2 participants