Pikuma.com writes a software renderer pretty much from scratch with all the necessary math and explanations in a very pedagogical way. Highly recommend it
Getting a triangle on the screen is the hello world of 3D applications. Many such guides for your backend of choice. From there it becomes learning how the shaders work, internalizing projection matrices (if you're doing 3D) which takes a bit of thinking, then slowly as you build up enough abstractions turns back into a more "normal" data structures problem surrounding whatever it is you're actually building. But it's broad, be prepared for that.
Definitely recommend starting with a more "batteries included" framework, then trying your hand at opengl, then Vulkan will at least make a bit more sense. SDL is a decent place to start.
A lot of the friction is due to the tooling and debugging, so learning how to do that earlier rather than later will be quite beneficial.
If you want to render 2d vs 3d there are different tradeofs, a 3d renderer has to do interpolation of attributes over triangles, a 2d renderer doesn't and as a result can render ngons without having to triangulate them.
I'm just going to dump some links really quick, which should get anyone started.
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:
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.
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.
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).