Click the Green Flag WASDQE and Arrow keys Use this link if you think the project is too slow on Scratch: https://turbowarp.org/808824832?stuck&hqpen&fps=60
This project adds baked shadow volumes to the new framework I have been working on: https://scratch.mit.edu/projects/762163512/ WHAT IS THIS?: This project's 3D Binary Space Partitioning(BSP) gen was adapted from @Chrome_Cat's 2D BSP engine. Now, Chrome_Cat has made a 3D BSP framework which you can find here: https://scratch.mit.edu/projects/781230144/. Since they are both based off of the same BSP algo, they are very similar. When I created the shadow volume baker, the shadows would get jumbled with their subject polygons. This was because the sorting algo would jumble the orders of coplanar polys. To solve this, I wanted to somehow stabilize the algo while keeping it in-place, but I realized that I would spend way too long trying. Instead, I just made a number sorter that sorted out the coplanar polys before loading them onto the BSP tree. It was probably inelegant, but it worked. FURTHER NOTES: I think there are still some shadow bugs oof FINAL THOUGHTS AND WHAT IS NEXT: I think this project may be ready, or at least is close to being ready for a demo project. I'm thinking about the poolrooms(backrooms) with lighting and everything. I still need to add point light shadows though. That shouldn't be too difficult. Oh yeah, and also z-clipping. CREDITS: 3D BSP sort adapted from @Chrome_Cat's 2D BSP sort. Compare the code; the code can be found here: https://scratch.mit.edu/projects/714869495/ Triangle filler by ():