Re:I learned Vulkan and wrote a small game engine with it
by throwaway2046 on Saturday November 22, 2025 @08:14AM
(#46014531)
This is a gold mine, thank you.
Re:I learned Vulkan and wrote a small game engine with it
by Pulcinella on Saturday November 22, 2025 @10:07AM
(#46015345)
Awesome! Do you have any resources on, uhhh, "hardware accelerating" a software renderer. i.e. using SIMD (or math hardware like the vector hardware you can access with the Accelerate[0] framework on Apple devices).
Re:I learned Vulkan and wrote a small game engine with it
by user____name on Saturday November 22, 2025 @01:16PM
(#46016887)
There's the work on Larrabee by Mike Abrash and co:
https://www.gamedeveloper.com/programming/sponsored-feature-...
Re:I learned Vulkan and wrote a small game engine with it
by gustavopezzi on Saturday November 22, 2025 @06:33PM
(#46019322)
Hi there. Gustavo Pezzi here! Thanks for the mention. I always add new stuff to the lectures and I'm happy to inform that about a year ago I have added a bonus lecture on fixed-point rasterization at the end of that course. Nothing too crazy, but enough to cover the main points. Also, the PlayStation programming course is pretty much 100% fixed-point if anyone feels like diving into that too.
I'm just going to dump some links really quick, which should get anyone started.
Getting a framebuffer on screen: https://github.com/zserge/fenster
I would recommend something like SDL if you want a more complete platform abstraction, it even supports software rendering as a context mode.
Filling solid rectangles is the obvious first step.
Loading images and copying pixels onto parts of the screen is another. I recommend just not drawing things that intersect the screen boundaries to get started. Clipping complicates things a bunch but is essential.
Next up: ghetto text blitting https://github.com/dhepper/font8x8 I dislike how basically every rendering tutorial just skips over drawing text on screen, which is super useful for debugging.
For drawing single pixel lines, this page has everything on Bresenham:
http://members.chello.at/easyfilter/bresenham.html
For 2d rasterization, here's an example of 3 common approaches: https://www.mathematik.uni-marburg.de/~thormae/lectures/grap...
Scanline rasterization tought me a lot about traversing polygons, I recommend trying it even if you end up preferi g a different method. Sean Barrett has a good overview: https://nothings.org/gamedev/rasterize/
Side note: analytical antialising is fast, but you should be carefull with treating alpha as coverage, the analytic approaches tell you how much of a pixel is covered, not which parts are.
For 3d rasterization Scratchapixel is good: https://www.scratchapixel.com/lessons/3d-basic-rendering/ras...
Someone mentioned the Pikuma course which is also great, though it skips over some of the finer details such as fixed point rasterizing.
For good measure here's some classic demoscene effects for fun: https://seancode.com/demofx/
Anyway, this is just scratching the surface, being progressively able to draw more and more types of primitives is a lot of fun.