Page MenuHomeWildfire Games

Performance fix for very high shadows on very large screens.
ClosedPublic

Authored by karmux on Jun 23 2022, 1:37 PM.

Details

Summary

Background of the issue: https://wildfiregames.com/forum/topic/84218-sudden-drop-in-fps-after-4096px-width-of-the-window/

Very high setting on large screens like 5120x1440 calculated shadow map size 32768. That was 16x more than high setting, 32x more than medium setting and 64x more than low setting.

After this change shadow map sizes using very high setting by resolution will be following:
1920x1080 - 4096
2560x1440 - 4096
3840x1440 - 4096
5120x1440 - 8192
3840x2160 - 4096
7680x4320 - 8192

Test Plan

Run the game with fps display turned on with various shadow quality settings.

Diff Detail

Repository
rP 0 A.D. Public Repository
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

karmux created this revision.Jun 23 2022, 1:37 PM
Owners added subscribers: Restricted Owners Package, Restricted Owners Package.Jun 23 2022, 1:37 PM
karmux requested review of this revision.Jun 23 2022, 1:37 PM
karmux added a reviewer: Stan.Jun 23 2022, 1:39 PM
karmux edited the summary of this revision. (Show Details)Jun 23 2022, 1:42 PM
vladislavbelov accepted this revision.Jun 23 2022, 2:39 PM
vladislavbelov added a subscriber: vladislavbelov.

I can’t say it’s a performance fix, because the very high setting is for high-end hardware, where it works fine. It’s more like a logic fix.

Anyway looks good to me.

This revision is now accepted and ready to land.Jun 23 2022, 2:39 PM
Stan accepted this revision.Jun 23 2022, 2:54 PM

LGTM, I was afraid it would mean a too small shadowmap (and thus low quality) on high end settings, but if @vladislavbelov says it's okay then it's fine by me.

Stan added a comment.Jun 23 2022, 7:04 PM

Thanks for the patch.

This revision was automatically updated to reflect the committed changes.