With VSync and FullScreen on and a shadowMapResolution of 2048 and 5096, I get a constant 61 FPS. It goes down to 41 FPS when I bring it up to 10192.
I hate my weak laptop!!! >_<
Do you mind testing some settings so I can predict the performance of it? It would be really nice of you!
1. Change the number of god ray samples in shaders\volumetric.frag (the #define SAMPLES 64) to 128.
2. Set shadow map resolution to 2048.
3. Fullscreen on.
4. VSync OFF.
That should be a common scenario for the highest graphics settings in a game. Please tell me the FPS. Sorry for failing with the FPS rendering... ._.
The algorithm benefits heavily from texture caching, so the angles between the camera frustum and the light frustum affects FPS a lot (at least on my computer). In a worst case scenario (90 degrees angle) it would actually need 128 texture lookups for 128 samples. As the angle gets smaller, the same depth buffer value will be tested multiple times against different values, resulting in a lower amount of actual lookups. Looking at objects close to the screen also puts the samples closer together, so it will be faster too.
Therefore, it would be nice if you could test some extreme scenarios too.
- What was the highest FPS you got and how where you looking to get it?
- What was the lowest FPS you got and how where you looking to get it?
- What was the average FPS approximately?
Remember to turn off VSync, as it limits your FPS to your refresh ratio, and I think your graphics card can definitely handle more than 60 FPS. xD And if the FPS is disappointing (128 samples is pretty much), remember that it is very unoptimized, and that I can basically make it 4x as fast with a little work.
PS: If someone's interested in how I'm doing this, I found this article which is very similar (except they draw geometry, and I do everything with a shader): http://developer.amd.com/media/gpu_assets/Mitchell_LightShafts.pdf
The funny thing is that I found this AFTER I implemented my idea. Now I've come up with the idea for both depth peeling AND this volumetric light algorithm by myself, only to realize they already exists. Frustrating. xD