Twitter | Search | |
Raph Levien
Rust. Fonts. Graphics. Quaker. Independent. he/him
793
Tweets
52
Following
3,211
Followers
Tweets
Raph Levien Jan 26
Replying to @Mooman219
Ohhhh I see what you're doing. It's a Bresenham-like DDA where you're getting all the line / pixel square crossings and then doing triangle within that. Clever.
Reply Retweet Like
Raph Levien Jan 26
Replying to @Mooman219
Interesting. It looks like you're not doing exact triangle area but an approximation similar to what SDF rendering typically does?
Reply Retweet Like
Raph Levien Jan 18
Replying to @Azumanga @dubya_brian
How then would your application display a UI, or output audio? What you say makes sense if it can be expressed entirely in terms of stdlib.
Reply Retweet Like
Raph Levien Jan 17
My response to the recent Actix drama about unsafe, with a modest proposal how to hopefully make things better:
Reply Retweet Like
Raph Levien Jan 14
Any reason no Inconsolata 3.000?
Reply Retweet Like
Raph Levien Jan 14
Replying to @rikarends
New hypothesis: Metal is allocating the render target buffer in eDRAM, but not the MTLTexture objects I request. A way to test this hypothesis would be to try on a machine that doesn't have eDRAM.
Reply Retweet Like
Raph Levien Jan 14
Replying to @rikarends
I doubt it; my compute shader is running with full SIMD utilization (I checked). I also tried byte writes (doing unorm conversion in ALU), same bandwidth.
Reply Retweet Like
Raph Levien Jan 14
GPU twitter: on Metal, Iris Plus 640, I'm seeing roughly 4x bandwidth for fragment shader writes to render target (~10Gpix/s) vs texure2d.write(~2.5Gpix/s). Is there a good explanation for this?
Reply Retweet Like
Raph Levien Jan 8
One of the best explanations of moderately tricky geometry and math I've ever seen.
Reply Retweet Like
Raph Levien Jan 5
The fact that right shift of a negative number is UB is not being close to the machine, it's a delusional fantasy of being able to abstract over a class of machines that includes non twos complement (fortunately to be fixed in C/C++2x).
Reply Retweet Like
Raph Levien Jan 5
And ℤ/2³²ℤ is a perfectly fine mathematical object, it's just that most of the time you want to imagine you're actually in ℤ but with the additional invariant that you're not overflowing. Rust gives you the choice.
Reply Retweet Like
Raph Levien Jan 5
Rust is the closest thing we have to that today. For example, signed wrapping arithmetic operations exist in the CPU but were effectively removed from C/C++. But they exist in Rust (if a bit verbosely).
Reply Retweet Like
Raph Levien Jan 4
And the source code is at
Reply Retweet Like
Raph Levien Jan 4
The extremely awesome folks at fished the code out for me, and it's now working again at
Reply Retweet Like
Raph Levien Jan 3
You're right. One of the joys of having stuff hosted in the cloud. I'll see if I can find a local copy :/
Reply Retweet Like
Raph Levien Dec 28
Thanks, that looks perfect!
Reply Retweet Like
Raph Levien Dec 27
Replying to @LH
Maybe, but that feels like it's shooting a little high.
Reply Retweet Like
Raph Levien Dec 27
Replying to @raphlinus
I've generalized this to cubic Béziers, test page is up at . Question for 2d graphics Twitter: what's a good journal or conference to submit to? It feels like it's met the threshold for an academic paper.
Reply Retweet Like
Raph Levien Dec 26
Fun stuff. Here's the logo I coded up while I was there: . I started from a version by and refined it.
Reply Retweet Like
Raph Levien Dec 25
Replying to @pixelio
Sure, press "s" or "w" to see the Sederberg or Wang solution. Competitive when curvature is near constant, less so when it varies a lot. Thanks again for the references!
Reply Retweet Like