-
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
Use ANGLE_instanced_arrays extension to reduce buffer sizes for layers with property functions #1898
Comments
My impression is that it'd be worth prototyping and benchmarking a I'm not clear if there's a way we could use this API to reduce the # of WebGL API calls for any other layer types. |
I wonder how exactly Google Maps uses this feature... |
It could be very useful for reducing buffer sizes for data driven styling. For example, if you had per-feature colours you could using instancing to store the colors per-triangle instead of per-vertex and use 1/3 the space. (I think you could potentially save even more space by making an instance 2 triangles and adding degenerate triangles to polygons with an odd number) According to webglstats.com support is around 90% in browsers. I think all iOS devices support it. It's an extension on Android but it's hard to get stats on how well it's supported. If we use it we'd have to accept supporting less devices (what % less?) OR having two separate paths/a polyfill (how bad would this be?). |
If GMaps requires it, I'd assume that support is good enough for us to require as well. |
- avoids the need to namespace attribute names with string concatenation - this let's us use attribute.name as the shader attribute name - this will let us use instanced rendering (#1898) with a shorter buffer when that extension is available.
- avoids the need to namespace attribute names with string concatenation - this let's us use attribute.name as the shader attribute name - this will let us use instanced rendering (#1898) with a shorter buffer when that extension is available.
- avoids the need to namespace attribute names with string concatenation - this let's us use attribute.name as the shader attribute name - this will let us use instanced rendering (#1898) with a shorter buffer when that extension is available.
- avoids the need to namespace attribute names with string concatenation - this let's us use attribute.name as the shader attribute name - this will let us use instanced rendering (#1898) with a shorter buffer when that extension is available.
- avoids the need to namespace attribute names with string concatenation - this let's us use attribute.name as the shader attribute name - this will let us use instanced rendering (#1898) with a shorter buffer when that extension is available.
- avoids the need to namespace attribute names with string concatenation - this let's us use attribute.name as the shader attribute name - this will let us use instanced rendering (#1898) with a shorter buffer when that extension is available.
https://www.khronos.org/registry/webgl/extensions/ANGLE_instanced_arrays/
According to this presentation about WebGL2, this feature (available for WebGL 1.0 as extension) can lead to significant performance gains. Interesting bit:
The concept is:
cc @ansis @kkaefer @jfirebaugh @lucaswoj what do you think? Can we use it?
Also related: #1361 (mentioned in the slides as a notable perf feature too)
The text was updated successfully, but these errors were encountered: