fix analyzation not taking instancecount in account + settings calibration

Signed-off-by: Bret Curtis <psi29a@gmail.com>
pull/578/head
bzzt lost a hitlab login 5 years ago committed by Bret Curtis
parent b7b31926a8
commit 4dccabeb83

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

@ -110,16 +110,16 @@ max composite geometry size = 4.0
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.
object paging merge factor = 1500
object paging merge factor = 250
# Cull objects smaller than this size divided by distance
object paging min size = 0.01
# 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'.
object paging min size cost multiplier = 4
object paging min size cost multiplier = 25
# Assign a random color to merged batches.
object paging debug batches = false

Loading…
Cancel
Save