tyt2y3 / vaserenderer

VASE renderer is a polyline and curve renderer on OpenGL.
tyt2y3.github.io/vaser-web
BSD 3-Clause "New" or "Revised" License
342 stars 39 forks source link

Antialiasing troubles. #3

Closed intmainreturn00 closed 4 years ago

intmainreturn00 commented 7 years ago

Hello, I'm currently working on anti-aliased drawings with cocos2dx engine. I'm started from tesselation done by myself and now comparing the results with more complex libraries. I came across your pretty amazing samples...but at one of the sample I found out the geometry error, which I faced on my own tesselation implementation. How we can avoid such things? Here at inner corner. The blue overlapping. image

And second question. Do you try (or maybe hear about any attempt to run vase with cocos2dx engine?

tyt2y3 commented 7 years ago

Thank you for your interest. Well, that is not a geometry error, but an overdraw across anchors. If you turn off the alpha-ed, it will go away. In theory, it will be too troublesome to detect and fix all self intersections. You can tackle this issue at a higher level, for example using an alpha mask so that overdrawing would be no harm. I wonder, though, why the interpolation quality is so low. Finally, no, no one had implemented a 2d rendering library on iOS based on VASEr. In fact, I think the native API is already fast enough and well optimized. Unless you needed thousands of varying paths per frame. So what is your real need here?