Open mulle-nat opened 11 months ago
This is unfortunately due to the antialiasing algorithm used by nanovg.
An alternative is to use MSAA, one of the examples shows how to set that up.
Thanks, I wasn't aware that I could use MSAA to replace nanovg edge antialiasing. I am trying to use MSAA (4) as the default now and EdgeAntialiasing as a fallback option.
It seems though, that there is more to do than just adding glfwWindowHint( GLFW_SAMPLES, 4)
. For example at my current understanding (being mostly this stackoverflow.) nvgluCreateFramebuffer
doesn't seem to be coded to be MSAA aware. I am also not sure how this will pertain to textures, so I have no real feel for how much more work this will be.
Just to get a better understanding of things:
I suspect, that when the area to fill gets less than a pixel, something goes awry at the very top of the circle hole:
In this special case, it can be mitigated with
nvgIntersectScissor
.For reference this is how it's drawn (it uses a few "UIKit"isms, that should be easy to understand)