-
Notifications
You must be signed in to change notification settings - Fork 61
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Double shadow buffers in W3DBufferManager #604
base: develop
Are you sure you want to change the base?
Conversation
When i messed with this when i wrote the buf manager initially eventually shadows started degrading and disappearing, its possible i changed something else too that caused that i guess.. So this needs careful verification of if there are regressions Should be noted none of these changed in BFME1/2 : thus i suspect the issue of the shadows overflowing the buffers likely stems from the Volume Shadow classes themselves as i did also test with double values in WB when i wrote the code and it eventually throws the asserts anyway |
I would say let's leave this change open for now and re-investigate as soon as more surrounding code is available. Ideally we fix it so it never crashes even if the pools depleted. I tried adding nullptr checks where the asserts hit, but that just caused the game to crash somewhere else. Edit: Crashes are fixed with #1101 |
c7c8eb0
to
8a34c88
Compare
8a34c88
to
e97d744
Compare
Codecov ReportAll modified and coverable lines are covered by tests ✅
❗ Your organization needs to install the Codecov GitHub app to enable full functionality. Additional details and impacted files@@ Coverage Diff @@
## develop #604 +/- ##
========================================
Coverage 2.53% 2.53%
========================================
Files 949 949
Lines 110299 110299
Branches 18881 18881
========================================
Hits 2800 2800
Misses 107095 107095
Partials 404 404 ☔ View full report in Codecov by Sentry. |
I have added better comments to the shadow buffer limits. Doubling It is not yet entirely clear to me if We do have a shadow test map which could be useful for testing higher limits, but this test map currently does not load correctly in Thyme because of this bug: #1053 Needs fixing first.
@tomsons26 Thyme: int vb_size = std::max(8192, size);
int ib_size = std::max(32768, size); BFME: int vb_size = std::max(16384, size);
int ib_size = std::max(32768, size); |
BFME vs ZH
|
We know that 512 + 1 Scorpion Tanks in the scene will deplete the shadow memory pools. I have now tested against 1024 Scorpion Tanks in the scene. Double MAX_NUMBER_SLOTS only with 1024 Scorpion Tanks
results in
Double MAX_NUMBER_SLOTS and BUFFERS_CREATED with 1024 Scorpion Tanks
results in
ConclusionScaling the following 3 limits uniformly is the correct strategy.
|
This change doubles the shadow slots in W3DBufferManager. This allows twice as many meshes in a scene to cast shadows before the buffer space runs out.