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

ScatterplotLayer circles not rounded correctly #126

Closed
ilijapuaca opened this issue May 4, 2020 · 2 comments
Closed

ScatterplotLayer circles not rounded correctly #126

ilijapuaca opened this issue May 4, 2020 · 2 comments
Assignees
Labels
bug Something isn't working

Comments

@ilijapuaca
Copy link
Contributor

From #124:

That being said I don't think these look the way they're supposed to look, they seem to be squares instead of circles that I'm seeing on the web. Also, when zooming in very closely, they seem to stop scaling at some point. I'm seeing weird geometry in the geometry inspector (could just be a bug in the tool, it's pretty flimsy sometimes) although all of the values seem valid, no NaNs or anything.

Changing SMOOTH_EDGE_RADIUS in geometry.glsl.h to 0 seems to completely get rid of the issue. I am not clear on the specifics about smoothedge/smoothstep, I see that it's a way to interpolate values, but I am not sure why it'd cause results we're seeing when it has the same value in JS.

@ilijapuaca ilijapuaca added the bug Something isn't working label May 4, 2020
@ilijapuaca ilijapuaca self-assigned this May 4, 2020
@ibgreen
Copy link
Contributor

ibgreen commented May 4, 2020

I believe the smoothstep is there to minimize pixelization/jaggedness of circle. Maybe the resulting alpha channel interacts with blending?

@ilijapuaca
Copy link
Contributor Author

Blending wasn't in place when I initially worked on this. Just gave it a try and the circles look perfect.

I was thrown off by that last line in fragment shader as I thought inCircle would either be 0 or 1, and since we already discard the ones with value 0 I wasn't sure what it was supposed to do, as I tried commenting it out and did not make a difference.

Closing this as the issue seems to be fixed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants