When I started college I was convinced I knew what the most important problem in the world was. As I get older, I keep finding a lot more problems more important than that.

Using the GPU for rendering is what enables @warpdotdev@twitter.com to render large amounts of terminal text and UI at over 60fps on a 4K screen.

If you want a fast performant terminal with modern UI, come join our waitlist here: warp.dev


Show thread

Linear gradients

How do we transition pixels' color along the direction of the gradient. The trick is to project the position of the pixel to the direction of the gradient. Pixels closer to the end of the gradient will have a larger magnitude. 9/10

Show thread


A complication is that rounded corners lead to jagged edges since the pixels don't fall squarely in the pixel grid. The solution is to gradually transition the pixel color across the boundary.


Show thread

Drawing rounded corners:

We use distance fields to describe rounded edges. Given a pixel, a distance field outputs its distance to the nearest edge of a shape. This is a useful API for fragment shaders, which only has access to one pixel at a time.


Show thread

Drawing borders:

While drawing borders, the rectangle stays the same size and shape. So we just have to edit the fragment shader. We infer which quadrant the pixel is in to calculate its corresponding border corner. Then we assign pixels outside it with the border color. 6/10

Show thread

Drawing a rectangle:

For the vertex shader, we normalize the coordinates of the vertex to be independent of the viewport. For the fragment shader, we can return the interpolated color of the pixel. 5/10

Show thread

We provide instructions to the GPU via a pair of functions: the vertex shader and the fragment shader. The vertex shader’s job is to produce the positions that need to be drawn. The fragment shader determines the color for every pixel within these position boundaries. 4/10

Show thread

We thus switched to GPU rendering. The GPU has more cores and so can perform data-parallel calculations like calculating pixel position and color very quickly. We wrote shaders for glyphs, icons, and styled rectangles. They form all of Warp's UI:

Show thread

Why render on the GPU?

Warp is a fast Rust-based terminal with modern UI elements. We initially built the UI elements using html and css, but found that using the CPU for rendering was a performance bottleneck. 2/10

Show thread

I'm excited to nerd out and share an interesting engineering challenge I tackled at @warpdotdev@twitter.com.

Here's how Warp rendered our rectangle elements using graphics shaders. Learn about distance fields, antialiasing, and vector projections. 1/10


tired: asking for design help on drawing diagrams

wired: asking for design love on some diagrams

The moment when you recompile the app on release mode, and the bug you were solving disappears 💫

For once, I feel hopeful that we can beat climate change in our lifetime.

I watched Netflix’s “Kiss the Ground.” We can capture all the excess carbon in the air, by regenerating our soil.

It’s refreshing to see hopeful content that offer solutions. Any recs?

An insider’s primer into all that’s exciting in logistics 🚀🚛

RT @aquariusacquah@twitter.com

Finally getting around to putting pen to paper on why I'm so excited for the next decade of logistics tech. An initial blueprint describing how to build a world were atoms can move as easily as bits. Would love to hear thoughts.


🐦🔗: twitter.com/aquariusacquah/sta

That feeling on vacation when you actually finish all the groceries you bought on day 1 of vacation 😌😌😌

I finally got past my fear of driving too fast, after driving around in Connecticut yesterday.

Speed limits are 50% higher here. The limit on roads here are the same as the limit on Manhattan highways. 🤯

To set up a new k8s cluster, it turns out I needed to click "EKS - Cluster" instead of "EKS" for step 3 of 50.

Show thread

The AWS design principle is wrong.

Simple setups (e.g. set up a vanilla VM) should be easy and they should hide advanced config options except for pros.

The bad news is that I received multiple honks and shouts. The good news is that I now know how to switch lanes in heavy traffic.

Show thread
Show older

Server run by the main developers of the project 🐘 It is not focused on any particular niche interest - everyone is welcome as long as you follow our code of conduct!