1
0
Fork 1
mirror of https://github.com/TES3MP/openmw-tes3mp.git synced 2025-10-08 15:56:37 +00:00

fix analyzation not taking instancecount in account + settings calibration

Signed-off-by: Bret Curtis <psi29a@gmail.com>
This commit is contained in:
bzzt lost a hitlab login 2020-05-06 13:37:00 +00:00 committed by Bret Curtis
parent b7b31926a8
commit 4dccabeb83
2 changed files with 10 additions and 3 deletions

View file

@ -264,6 +264,11 @@ namespace MWRender
mCurrentStateSet = nullptr; mCurrentStateSet = nullptr;
return result; return result;
} }
void addInstance(const Result& result)
{
for (auto pair : result.mStateSetCounter)
mGlobalStateSetCounter[pair.first] += pair.second;
}
float getMergeBenefit(const Result& result) float getMergeBenefit(const Result& result)
{ {
if (result.mStateSetCounter.empty()) return 1; if (result.mStateSetCounter.empty()) return 1;
@ -445,6 +450,8 @@ namespace MWRender
emplaced.first->second.mAnalyzeResult = analyzeVisitor.retrieveResult(); emplaced.first->second.mAnalyzeResult = analyzeVisitor.retrieveResult();
emplaced.first->second.mNeedCompile = compile && cnode->referenceCount() <= 3; emplaced.first->second.mNeedCompile = compile && cnode->referenceCount() <= 3;
} }
else
analyzeVisitor.addInstance(emplaced.first->second.mAnalyzeResult);
emplaced.first->second.mInstances.push_back(&ref); emplaced.first->second.mInstances.push_back(&ref);
} }

View file

@ -110,16 +110,16 @@ max composite geometry size = 4.0
object paging = true object paging = true
# Affects the likelyhood of objects being merged. A higher value means merging is more likely and may improve FPS at the cost of memory. # Affects the likelyhood of objects being merged. A higher value means merging is more likely and may improve FPS at the cost of memory.
object paging merge factor = 1500 object paging merge factor = 250
# Cull objects smaller than this size divided by distance # Cull objects smaller than this size divided by distance
object paging min size = 0.01 object paging min size = 0.01
# Adjusts 'min size' based on merging decision. Allows inexpensive objects to be rendered from a greater distance. # Adjusts 'min size' based on merging decision. Allows inexpensive objects to be rendered from a greater distance.
object paging min size merge factor = 0.6 object paging min size merge factor = 0.3
# Controls how inexpensive an object needs to be to utilize 'min size merge factor'. # Controls how inexpensive an object needs to be to utilize 'min size merge factor'.
object paging min size cost multiplier = 4 object paging min size cost multiplier = 25
# Assign a random color to merged batches. # Assign a random color to merged batches.
object paging debug batches = false object paging debug batches = false