This is very cool, a clever technique to get cubic Bezier evaluation using a single 2D 2x2 bilinear texture sample. (Hi Alan!) I’m not sure I realized that the trilinear diagonal of a cube is a cubic Bezier (but when you say it that way it seems more obvious :P)
The Seiler representation feels in a way similar to Hermite; it’s still a Bezier with the 2 endpoints, and the interior 2 control points use a convenient differential form.
Kind of amazing the perf is as good as using shader code, FMA instructions or whatever. I would make the argument that this is useful even if slower (and it might be on, say, mobile hardware), since you are offloading work to the texture hardware. It’s like adding extra FMA units to the machine.
This makes me wonder if there’s some way to evaluate a quadratic B-spline using a 2D 2x(N+1) texture, sharing a texture edge with the neighbor segment, so the amortized cost of a segment is ~2 texels instead of 4…
dahart•6m ago
The Seiler representation feels in a way similar to Hermite; it’s still a Bezier with the 2 endpoints, and the interior 2 control points use a convenient differential form.
Kind of amazing the perf is as good as using shader code, FMA instructions or whatever. I would make the argument that this is useful even if slower (and it might be on, say, mobile hardware), since you are offloading work to the texture hardware. It’s like adding extra FMA units to the machine.
This makes me wonder if there’s some way to evaluate a quadratic B-spline using a 2D 2x(N+1) texture, sharing a texture edge with the neighbor segment, so the amortized cost of a segment is ~2 texels instead of 4…