Computers are confusing, OH edition: "Chrome [could] implement rounded corners [...] with a GPU shader. I think it's a 6 month project for a knowledgeable graphics engineer..."
-
-
Replying to @tabatkins
I mean, I assume WebRender implements rounded corners, so there's an existence proof?
1 reply 0 retweets 1 like -
Replying to @TedMielczarek @tabatkins
WebRender punts on really complicated border corners (they fall back to Gecko’s old render path), so maybe those cases are what the person had in mind? They’re very rare though. Different border styles meeting at different border widths, for example.
1 reply 0 retweets 3 likes -
For anyone wanting to implement rounded corners in a shader, here's WebRender's (
@pcwalton's) math for sufficiently precise distance-to-edge anti-aliasing: https://github.com/servo/webrender/blob/4fef6ca5ecce2c90703eace0212caff79374f129/webrender/res/shared.glsl#L70-L116 …1 reply 0 retweets 0 likes -
Also see https://github.com/servo/webrender/blob/4fef6ca5ecce2c90703eace0212caff79374f129/webrender/res/ellipse.glsl#L7-L32 … for how you get the distance to an ellipse edge (I really should write this one up properly)
1 reply 0 retweets 1 like -
Replying to @pcwalton @markusstange and
(Trust me, you don’t want to have to figure this one out from first principles) :)
1 reply 0 retweets 1 like -
Ellipses are the Devil's Halo.
1 reply 0 retweets 1 like
Would have been easier if they had been spec’d as quadratic beziers instead because then you could just use Loop-Blinn…
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.