Closed tinaun closed 2 years ago
Can you illustrate what you want?
my shape data has a color associated with each point in the shape, like this classic OpenGL example: https://learnopengl.com/img/getting-started/shaders3.png
This is a 2D CPU library. It doesn't operate on vertexes. To draw multiple triangles like this you would need to render one to a bitmap first and then use it as a pattern.
I know that, I was just wondering if there was a way I could render one without a gpu and without writing my own equivalent of SkCanvas::drawVertices - I guess someone has to.
I guess this is what you're looking for:
It seems like Skia uses a custom code path specifically for this function. Meaning there is no code for such a path in tiny-skia. It looks like a 500-1000 LOC patch. I can't imagine why anyone would want anything like this and I do not plan implementing it either.
or would I have to fill each triangle 3 times for each vertex's color with a gradient pattern to get the blending correct?