GD3D11 icon indicating copy to clipboard operation
GD3D11 copied to clipboard

Gothic 2: performance regression with 17.7-dev18 and above

Open stefson opened this issue 4 years ago • 5 comments

I noticed this a few days ago while updating the GD3D11 renderer, suddenly the game was stuttering heavily when I used [Q] and [E] to rotate my view of the word, the game was about to lagg rather intense for a brief moment. Also fps drop is quite significant:

with fps limit set to 30:

17.7-dev17 (good version): FPS=29,9-30 GPU=64-65%

17.7-dev18 (first bad version): FPS=29,9-30 GPU=80%

that is quite a bit.

now I would love to bisect the commits between the good and the bad version, but I lack of the compiler infrastructure on my win7 machine.

stefson avatar Jul 16 '21 13:07 stefson

the commit that regressed this is propably one of these: https://github.com/Kirides/GD3D11/compare/v17.7-dev17...v17.7-dev18

stefson avatar Jul 16 '21 13:07 stefson

You are right. To have a higher precision sun, light and sky rendered the DirectXMath Est lower precision functions were replaced by normal precision functions. For slower GPUs this more load is in gameplay noticable. Otherwise a configuration setting would need to be introduced to select between normal and lower precision.

lucifer602288 avatar Jul 16 '21 21:07 lucifer602288

Well, this is a bit of a problem regarding the insane pricetags for modern GPUs on the market. If its not too much to ask for, it would make me really happy to have a switch for normal and lower precision. Mind you, it's possible to reduce shadows to gain more average fps, but still the game does stutter significantly when the character is rotated around itself with Q/E controlls.

stefson avatar Jul 19 '21 10:07 stefson

The performance on older hardware will only degrade the more the renderer implements and fixes. e.g. Rendering the ghosts correctly and flushing state to fix water textures on the ground introduced a bunch of load on older hardware.

Also, would you mind trying some external frame limiter, instead of the ingame provided one? The ingame one is very barebones and while it does limit the FPS and reduce CPU load, it's not as useful as real v-sync with a lower refresh rate.

What are the system specifications we are talking about in here?

Everything below a GTX 1050 / rx 470 won't be actively supported by me (if some dev finds a place to gain performance for older hardware, i will gladly include that.)

kirides avatar Jul 19 '21 13:07 kirides

sooo, I bought a second hand rx570, polaris 10.

while testing I noticed that 17.7-dev20 uses some 2,3gb of vram. its quite possible that this was the bottleneck on my old rx550, which has only 2gb of vram. If you are able to confirm I would opt for a proper warning in the readme, both for vram and gpu equal or faster than rx470

P.S: my monitor's maximum resolution is 1680x1050

stefson avatar Oct 12 '21 20:10 stefson