Example for Raylib for using shadows in 3D. Comes with a Sun light and a spotlight with adjustable cone shapes.
This example uses code from the raylib shaders example to create lighting with shadows on 3d objects.
- download and extract
- type
maketo build if you make changes, and./shadowto run the game.
If you're on NixOS, make sure you have a nix-shell then use make and ./shadow if you made changes.
Understand that I'm not a pro at Raylib, and yes I did use Claude AI to assist me in writing this code. The code was mostly created by me with help from raylib examples. Any time I got stuck, I asked AI. Code was copied by hand, not copied and pasted without going through it.