community-rpg
community-rpg copied to clipboard
Switch to Raycasted Shadows
https://api.arcade.academy/en/latest/tutorials/raycasting/index.html
The referenced effect runs extremely slowly on my system due to a weak GPU. We may want to look into optimizing it or offering graphics settings options in the game's menus.
There are more efficient tricks such as "spherical projection" (done in pixel shader) creating a 1D array. This array is wrapped around a full circle to look up shadow values. It can be pre-computed for static environment lights that don't cast shadows on moving objects.