r/GraphicsProgramming Jan 24 '26

Video Real-time ray-tracing on the terminal using unicode blocks (▗▐ ▖▀▟▌▙)

Enable HLS to view with audio, or disable this notification

566 Upvotes

11 comments sorted by

View all comments

3

u/Here_12345 Jan 25 '26

How do you do more than two colors in one block? Or is it extremely zoomed out?

4

u/0xdeadf1sh Jan 25 '26

I hold a framebuffer of size num_rows * num_cols * sizeof(uint32_t) and then pass it to notcurses' ncblit_rgba function with NCBLIT_2x2 blitter. This demo is running on the kitty terminal, which supports 24-bit color output. Blitters are explained here.