Oh sorry i was talking about continuous SDFs, like not made into a texture. A pixel is able to take a discrete sample of the continuous SDF and reconstruct.
-
-
Replying to @Atrix256
Oh, you mean something like constructing a voronoi diagram for edges and encoding distance to edge in each voronoi region?
1 reply 0 retweets 0 likes -
Replying to @pcwalton
Like mathematically defining some 2d shapes, possibly doing domain distortion (modify x values in strange ways), using modulus to repeat the shapes, and operations to combine the influence of multiple distance fields. Its not good for drawing text, but lemme grab a shadertoy rq.
2 replies 0 retweets 2 likes -
Replying to @Atrix256
Ah, I see, that’s cool! Not really relevant for <canvas>/SVG/text which are all about beziergon meshes though
1 reply 0 retweets 0 likes -
This looks relevant: https://www.shadertoy.com/view/Mlj3zD Compute SDF from bezier, evaluate per pixel.
2 replies 0 retweets 2 likes -
(1) This is exactly my point: drawing curves on GPU is easy. It’s drawing *polygons* (or beziergons) that is hard. (2) There’s a much more efficient way to draw cubic beziers, as shown by Taubin, “Distance approximations for rasterizing implicit curves” 1994
1 reply 0 retweets 6 likes -
(That paper is the basis of Loop/Blinn, and I use the technique to draw elliptical border radii in Firefox/WebRender. I should blog about it)
1 reply 0 retweets 3 likes -
Not saying that this is going to be more efficient, it's just a different approach that's neat, but you can do analytic SDFs polygons too (see https://www.iquilezles.org/www/articles/distfunctions/distfunctions.htm …).
2 replies 0 retweets 1 like -
It’s not actually a different approach if you squint—Massively Parallel Vector Graphics is kind of the same idea. But generating the analytic SDF for arbitrary beziergons requires that you compute the winding numbers. No free lunch :)
1 reply 0 retweets 0 likes -
Yeah, and likewise you wouldn't render a AAA games skeletally animated mesh this way either. But, if you're making a new 2D library where you're compositing boxes and curves and such and you want super neat ways of blending and transforming them, an analytic SDF lib could be cool
1 reply 0 retweets 0 likes
Note that active edge lists are basically 1D SDFs :)
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.