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

support per-feature style attributes #146

Closed
ansis opened this issue Oct 23, 2013 · 2 comments
Closed

support per-feature style attributes #146

ansis opened this issue Oct 23, 2013 · 2 comments

Comments

@ansis
Copy link
Contributor

ansis commented Oct 23, 2013

Very bluesky, but it would be good to be able to style features based on their attributes, for example buildings based on heights, etc.

You could just split things into many buckets, but that will blow up the number of draw calls. The other approach would be to optionally add certain attributes to the buffers and pass them into shaders.

Since attributes can't be optional in shaders, we'd need a separate shader for each combination of attributes. As scary as it sounds, generating the shader code could work well.

@ansis
Copy link
Contributor Author

ansis commented Feb 20, 2014

Since attributes can't be optional in shaders, we'd need a separate shader for each combination of attributes.

I was wrong about this. gl.vertexAttrib[1234][fv](index, value)

@jfirebaugh
Copy link
Contributor

bensleveritt pushed a commit to bensleveritt/mapbox-gl-js that referenced this issue Oct 24, 2016
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

No branches or pull requests

3 participants