I have just been looking at the C++ source for Draw Atlas and internally, it just uses DrawVertices.
Although the DrawAtlas performs better, it's still a little laggy. I think one of the inefficiencies is that every time I have to update it, DrawVertices is rebuilding the vertex buffer.
I was wondering if the following is possible?
- Create a fixed vertex buffer with all 200k points (this wont change)
- Have the shader render all points, transforming them into the correct view space using zoom/pan shader transform params
Basically, instead of doing the Zoom/Pan on the CPU and creating a new vertex buffer each time, create a "static" vertex buffer that is instead transformed in the shader? That way, the only thing that needs updating on the GPU is the Zoom/Pan tranforms?
I have found examples of screen space effects using skia shaders, but haven't found anything like the above that works with a vertex buffer? Is this possible with Skia do you know?
Thanks
Ben