Hello all,
First of all thank you for this game engine, I find it generally very well made and think this is an interesting project.
However I was quite surprised when I ran the example “creature_behaviors” and saw that it ran at only 24 fps on my decent PC (using linux, dont know if that matters).
After some tinkering I tried disabling shadows from all the skeletons - and wow I got 100 fps constant (My screen is 100hz so that is max fps for me).
So I am wondering is it normal to get so low FPS from using shadows?
And if that is normal that shadow have such a performance impact, do you consider doing another shadow implementation that looks worse but has better performance?
Cheers
Hello and thanks for the good words!
Shadow volumes indeed can have a big performance impact – they mean we render everything 2x, plus additional “shadow volume” rendering to the stencil buffer plus silhouette determination on CPU.
That said, 4x is indeed surprising.
I tested on my system (also Linux, x86_64, running nVidia) and I can see I even have less than you said, 18-20 FPS. Shadow volumes are clearly at fault, without them I have 60 FPS, which is my monitor’s refresh rate. So for me it’s not “4x difference”, but that’s just because my monitor has lower refresh rate than yours.
Actions:
-
I optimized shadow volumes recently already, I can optimize them more
I’ll see where is a bottleneck and can we deal with it. There are a number of ideas (e.g. cache silhouettes, in case their calculation is expensive – while all creatures animate in this example, their shadows don’t need to animate with max fps). It’s good that I have a testcase where I can profile and investigate.
-
We indeed have another shadows algorithm in the working – shadow maps. They are already available, kind of, but with some issues mentioned in that roadmap section. We want to work on it and remove these issues
Shadow maps will have a completely different performance, likely beneficial in many cases.
So, stay tuned – both AD 1 and AD 2 shall happen sometime soon (in Q1-Q2 of 2025) and we will be better 
1 Like