turnage/valora

Replace Tessellator

Opened this issue · 3 comments

Currently valora uses lyon for tessellation. Lyon does not handle complex self intersecting polygons well, especially small ones. It often crashes, returns an error, or enters infinite loops. It is not just lyon; I tested libtess2 as well. My understanding is that tessellation necessarily struggles with these inputs especially if it the vertices have small values.

The amicola branch implements a replacement for the tessellator. It is a rasterizer that generates boundary segments and fill spans from flat paths which the GPU can rasterize instead of triangles. This algorithm is more robust against complex input and can eventually be migrated entirely to the GPU.

That's interesting. I don't see anything in the docs about custom GLSL support though.

The main issues with blend2d are: no support for other color spaces than 8bit/channel and the worst: no linearization during blending. Meaning: every pixel whose opacity is not 100% will have 'wrong' color.

The best option seems to be Skia. They have support for all the nice formats with higher bit depths that are needed for high quality (physical) printing or even banding-free gradients on a modern screen and they also handle color correctly.
Or using Valora for motion graphics (which would be kinda cool) – 16bit/channel is minimum for that sort of stuff.