Overlapping points causes a turquoise noise/artefact
JamesLMilner opened this issue · 5 comments
Well, that's not good :( Do you mind sharing code to reproduce this? I have an idea of what it might be but the code would help.
Thanks for filing the issue.
Yeah for sure, check out: https://github.com/JamesMilnerUK/globe-plotter
Sorry it's a bit of a mess.
Nice project!
Can you try using color.NRGBA
instead? I certainly noticed that color.RGBA
can produce this kind of problem. Here's an example:
https://gist.github.com/mmcloughlin/e824139574762169ce7f232fd76da9df
Huzzah! this was indeed the problem. Other slight issue was I hadn't been paying attention in that JavaScript / CSS takes the standard of (uint8, uint8, uint8, float64) but after some minor type conversion this was fine:
Relevant type conversion code:
g := globe.New()
alpha := uint8(rgbaColors.A * 255) // i.e. 0.5 * 255
color := color.NRGBA{rgbaColors.R, rgbaColors.G, rgbaColors.B, alpha}
Edit: Is it worth potentially documenting this issue in the README?
Glad we could sort this out! I dropped a note in the README, because the very same issue confused me in the past. Thanks again for filing the issue.