Linkblog/2025/03/13
Floats to RGBA, Future is Niri, C Plus Prolog.
Encoding floats to RGBA - the final?
I was watching Karl’s Dev Stream while it was live, and he started digging into how his lighting system in his game worked.
Honestly I had no idea how one would do lighting in a low level graphics context before watching this stream, I asked Karl some questions and he basically switched from working on his game / showing it off to sort of giving what felt like a 1-1 lesson on how to go about doing it!
Karl referenced the article, Encoding floats to RGBA, as a trick to store the depth pass of a camera positioned at the sun (to calculate what is visible, vs. what isn’t.), into a RGBA texture, to later be used in the fragment shader of a pixel being rendered in the ground, doing another sort of pass from the perspective of the sun, and asking ‘_did the sun see something before it saw me, if so, I am not in the viewport of the sun, if I am equal to or greater, then the sun can see me, therefore I should be bright’.
The worst “street-cred” I have is that I’ve been using tiling window managers for thirty-five percent of my life: five years with Sway and two with i3. […]
Ersei discuses using tiling window managers, and brings up niri:
A very neat approach to sizing windows in a tiling WM context.
Many moons ago, I was a herbstluftwm enjoyer, so I know how productive and enjoyable a tiling WM can see, nice to see there is still space here to invent different approaches!
The current window setup in Playbit is actually the same idea as niri, so it seems like its not just one thing currently pulling this off.
needleful/c_plus_prolog - C Plus Prolog
Prolog is the only good programming language. I should know, my website is written in Prolog.
Unfortunately, C is the only useful programming language.
Scientists have been trying to find an answer to this problem for nearly 50 years. Some make their C more like Prolog. Others make their Prolog more like C.
I offer a new solution: simply add Prolog and C together. I call it, “C Plus Prolog”, or “C+P” for short.
:- include(stdio). int func main { puts("Hello, world!"); return 0 }.
Amazing.
The creators website, is also itself written in Prolog, truly dedicated.