mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-03-22 23:30:14 +00:00
Fix missing water by finalizing each tile completely per frame
Phase-splitting across frames caused water surfaces to not render correctly. Changed processReadyTiles to run all phases for each tile before moving to the next, with time budget checked between tiles.
This commit is contained in:
parent
0b6f5a9313
commit
7dd78e2c0a
1 changed files with 5 additions and 6 deletions
|
|
@ -981,14 +981,13 @@ void TerrainManager::processReadyTiles() {
|
|||
}
|
||||
}
|
||||
|
||||
// Drive incremental finalization within time budget
|
||||
// Finalize one complete tile per iteration, check budget between tiles.
|
||||
// Each tile runs through all phases before moving to the next — this
|
||||
// avoids subtle state issues from spreading GPU uploads across frames.
|
||||
while (!finalizingTiles_.empty()) {
|
||||
auto& ft = finalizingTiles_.front();
|
||||
bool done = advanceFinalization(ft);
|
||||
|
||||
if (done) {
|
||||
finalizingTiles_.pop_front();
|
||||
}
|
||||
while (!advanceFinalization(ft)) {}
|
||||
finalizingTiles_.pop_front();
|
||||
|
||||
auto now = std::chrono::high_resolution_clock::now();
|
||||
float elapsedMs = std::chrono::duration<float, std::milli>(now - startTime).count();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue