Refactored Shadows for Performance


I returned to this project after several months away. The next item I had in the backlog was to optimize shadow rendering for collectibles. I had been using a third-party asset for blob shadows. In the debug scene, I noticed that rendering a large number of collectibles caused a severe performance hit. I went from 400-500+ FPS down to less than 100 when getting all collectibles in view.

At first, I tried using a more performant asset I had found while working on another project. This did improve performance significantly, however, there were a number of visual issues that I didn't wasn't able to resolve.

In the end, I went with the Mario Odyessy approach. The scenes will now primarily be lit with a directional light that points straight down. This approach both gives the best performance and it has the added benefit of making it easier to judge the absolute position of moving platforms.

I anticipate this will make lighting in more complex scenes challenging, however, this is a good trade-off for the moment and I'd really prefer to implement some new gameplay mechanics as I return to this project.

Files

vaults-and-vampires-webgl.zip Play in browser
Version 2024-08-17-e76eaeb 89 days ago

Leave a comment

Log in with itch.io to leave a comment.