But first off I'd like to correct one of my previous statements:
What I wrote in my previous post about fog not being gone with the mod is incorrect - the mod just
doesn't change sectors from Kingdom End expansion (sanctuary of darkness, kingdom end).
I thought it it was affecting because when entering those sectors and was looking at the fog I still had good performance.
Normally the mod removes fog completely.
Going back the more reproducible and controlled environment:
I checked with the whole mod being:
Code: Select all
<?xml version='1.0' encoding='utf-8'?>
<diff>
<replace sel="/regions/region[@name='region_cluster_31_sector_001']/fields/volumetricfog/@densityfactor">0</replace>
</diff>
I played with the densityfactor and it does look like the performance is scaling with this factor fairly well.
going from 0 to 0.5 had following performance (volumetric fog in the graphics options set to "off"):
(screenshots below)
Code: Select all
densityfactor | fps
--------------+-----
0.0 | 82
0.1 | 80
0.2 | 70
0.3 | 60
0.4 | 52
0.5 | 46
for example for densifyfactor of 0.4:
(screenshots below)
Code: Select all
volumetric fog setting |
(densityfactor==0.4) | fps
-----------------------+-----
off | 52
low | 51
medium | 49
higigh | 40
I also checked how Sancuary of darkness bodes with densityfactor set to 0 instead of its normal 0.0025
and now I see why the "off" setting does not disable the fog completely. It looks like something went wrong.
But at the same time it's curious that I can still get good performance in Heretic's End just by decreasing the densityfactor from defauly 0.5 to 0.2,
still get 60 fps and retain the fog.
It seems like densityfactor is not really the only/main factor because for example in the mentioned Sancuary of darkness it's set to 0.0025
and going to 0 does improve performance significanly (but engulfs everything in ugly, flat, brown fog instead of a red one)
I am not that familiar with the vulkan stack but,
all this smells even more like this may be a driver/shader problem maybe the compiler is handling the shader IR inefficiently or it's just plain
written in such a way that for example AMD shader stack handles it worse then nvidia. (assuming of course that people with nvidia GPUs don't see such drastic slowdowns)
Next thing I guessed to look at was to check if there was one point in the pipeline that stands out, and it seems there is.
In the Radeon GPU profiler there appears to be one fragment shader
that takes all the time not seen with factor set to 0 and scales to weirdly large amount of shaded pixels:
- nothing for factor of 0
- 354 milion for factor of 0.5
- 584 milion for factor of 0.8
Other shaders seem to operate on much more sane amount ranging up to 14 milion pixels
Profile files (profiling with Radeon GPU Profiler seems to require usage of amdvlk userspace vulkan driver instead of mesa/radv):
https://drive.google.com/drive/folders/ ... sp=sharing
I guess the next thing will be to look at that shader code (which I can decompile via renderdoc). Maybe try something like live patch if that's possible
Screenshots when changing just the densityfactor:
0: https://drive.google.com/uc?export=view ... MxMS5mCvCx
0.1: https://drive.google.com/uc?export=view ... keRL83Yqw_
0.2: https://drive.google.com/uc?export=view ... 7BR1xaUPs1
0.3: https://drive.google.com/uc?export=view ... oFv37xCzVn
0.4: https://drive.google.com/uc?export=view ... bKBtMR85vX
0.5: https://drive.google.com/uc?export=view ... Mq6GxCP8Fv
Screenshots when changing just the volumetric fog setting in the graphics options while having densityfactor set to 0.4:
off: https://drive.google.com/uc?export=view ... cQ4s_ozGGh
low: https://drive.google.com/uc?export=view ... iGGcc-B7Mv
medium: https://drive.google.com/uc?export=view ... tYc4c8FOat
high: https://drive.google.com/uc?export=view ... btYCsEJkSJ