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

implement alpha/opacity for areas #15

Open
mk30 opened this issue Feb 15, 2021 · 2 comments
Open

implement alpha/opacity for areas #15

mk30 opened this issue Feb 15, 2021 · 2 comments

Comments

@mk30
Copy link
Collaborator

mk30 commented Feb 15, 2021

No description provided.

@mk30 mk30 changed the title add alpha/opacity to stylesheet implement alpha/opacity Mar 30, 2021
@mk30
Copy link
Collaborator Author

mk30 commented Mar 30, 2021

current plan:

make 3 new draw calls - pointtransp, linetransp, areatransp.probably shader will be same, but depth might be enable/disable, mask enable/disable..not sure.

canvas api - read pixel values as rgba from the texture. loop over them. separate out into 2 buffers: everything that's fully opaque and anything with some transparency. (as you go over everything in the data buffer, you can access the type. use that to know where to look in the style.png for each zoom level.)

sort transparency buffer by zindex value. pass the sorted transparent bucket as props into the transparency draw call.

benchmark canvas program vs js program. benchmark should run in browser not in node.

@mk30
Copy link
Collaborator Author

mk30 commented May 21, 2021

points and lines now complete. there's a single "line-opacity" setting. in the future, this can be split out to separate "line-fill-opacity" and "line-stroke-opacity" settings.

next step: areas.

@mk30 mk30 changed the title implement alpha/opacity implement alpha/opacity for areas May 21, 2021
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

1 participant