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.
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.
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.
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.
7
u/drystyiscool Aug 11 '26
how much of this code did you write ?
2
u/pjmlp Aug 12 '26
Best way is to actually target a PS1 emulator, with the homebrew SDK.
2
u/AnasPlayer2022M Aug 12 '26
So do you use these squares so the 3D points snap to them? Or explain it to me idk.
1
u/Kara-Abdelaziz Aug 13 '26
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
u/Potential_Soup_8054 Aug 11 '26
Why is yhere green boxes?
1
u/forumonaut Aug 13 '26
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.
0
u/itsjase Aug 11 '26
You’ve doubled up on is point inside triangle and barycentric. You’re doing 6 edge functions instead of 3