stamp triangle filler 2 stamps per triangle winding order: counter-clockwise a little distortion. which is the result of sacrificing precision for performance. tbh It's only 1.3x faster than pencil filler (on my PC). And this filler can't adjust saturation. Just use pencil filler. so how does it work? well you probably heard about fisheye shrinking trick from GriffPatch. Here's my not-so-helpful walk through: 1. Manually edit the SVG file. (width 3600, height 12000, Triangle 360 x 360) 2. Find fisheye effect source code and reverse it. 3. Split the triangle into two right triangles. 4. MATH bigger outline less distortion. i think 12000 is enough. How does fisheye work? In the frag shader, it takes the radius from the center and powers it to fisheye then resamples the texture. Basically radius_to_center ^ fisheye. For my sprite the formula would be x ^ fisheye = 0.8. The reverse formula is log(0.8, x).
sprite shader source code: https://github.com/scratchfoundation/scratch-render/blob/develop/src/shaders/sprite.frag #ifdef ENABLE_fisheye { vec2 vec = (texcoord0 - kCenter) / kCenter; float vecLength = length(vec); float r = pow(min(vecLength, 1.0), u_fisheye) * max(1.0, vecLength); vec2 unit = vec / vecLength; texcoord0 = kCenter + r * unit * kCenter; } #endif // ENABLE_fisheye