|
|
4 months ago | |
|---|---|---|
| .vscode | 4 months ago | |
| build | 4 months ago | |
| compiled_libs | 4 months ago | |
| fonts | 4 months ago | |
| objects | 5 months ago | |
| src | 4 months ago | |
| textures | 5 months ago | |
| Makefile | 4 months ago | |
| dbg | 5 months ago | |
| readme.md | 4 months ago | |
| run | 5 months ago |
World's Best Renderer, 2025
actors, textures, materials, meshes, and scenes (this isnt including internal ones like vectors and faces)pointers to reference objectsactors, for instance, to reference the same material or meshmaterial can have a texture reference to the window! (it's frame buffer is an RI_texture)RI_request_actors which creates new actors and returns a pointer to the list of total actors that exist in the RI contextRI_RI_render is calledfaces_to_render array is allocated (this is an array that stores every valid, renderable face in the scene and is specific to each scene) and if it isn't, it loops through every actor in the scene and checks the total number of faces, then allocates 2x the needed memory (this is because sometimes faces need to be split into 2, meaning that you need another slot where you previously only needed one)faces_to_render is clearedactor and calculates the transforms of positions, normals, and uvs for face in the mesh (it also performs shrinking and splitting culling here), checks if it's going to be in view, is a valid face, or has should_render set to true. If it is a valid face, it is added to the faces_to_render at the first open slot as a RI_renderable_face struct. The AABB of the face is also calculated heretarget texture's image buffer and the z buffer are clearedfaces_to_render and then check every pixel in it's AABB and sees if it is inside the face. If it is, figure out what the color should be (does it have a material? A texture? Is it wireframe?)RI_tick is called, it copies the RI context's image buffer into the SDL texture and renders the frame onto the window (it also handles SDL events)To run the binary, it needs to be in the same folder as librasteriver.so (if you just cloned the repo then they both should be in the build folder). You also need SDL2 installed (libsdl2-dev)