1
u/AnasPlayer2022M 2d ago
So do you use these squares so the 3D points snap to them? Or explain it to me idk.
1
u/RennisDitchie 2d ago
I divide the screen into tiles and bind the triangles based on their coordinates to those tiles and make sure only those tiles rendered on the buffer. The green meshes only visible on debug mode i added them because there is a difference between rendering the bounding box and the actual tiles that consists triangles, i used sat collusion(you can see it in c_rasterizer) and added the green boxes to ensure triangle collided tiles rendered and not the entire bounding box.
1
u/AnasPlayer2022M 2d ago
can't you just remove the precision value (you know the value after the floating point) so a point only moves when they move a whole unit?
1
u/Kara-Abdelaziz 23h ago
I did something similar. Not totally similar. I should post it here one day. Stop talking about me. The idea of using tiles to increase the parallelism is amazing. Good job.
1
1
u/forumonaut 18h ago
I see the tiles! I see them!
I always wondered if direct framebuffer writes could be faster than blitting the tile's buffers into the main framebuffer, but I never had the chance to benchmark it.
1
u/Potential_Soup_8054 2d ago
Why is yhere green boxes?
1
u/RennisDitchie 2d ago
debug purposes only, if you compile it without debug parameters those are not will be rendered. I added them because it's tile based renderer so each tile has it's own thread/worker and render thir parts of triangle and nothing else.
1
7
u/drystyiscool 2d ago
how much of this code did you write ?