Skip to content

Commit ca6bd3e

Browse files
Merge branch 'layer-merging-fix' into 'main'
[REMIX-4752] fix early termination from below threshold layers. See merge request lightspeedrtx/dxvk-remix-nv!1824
2 parents a65b6ab + 1f65225 commit ca6bd3e

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

src/dxvk/rtx_render/rtx_option.cpp

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -843,18 +843,20 @@ namespace dxvk {
843843

844844
addWeightedValue(optionLayer.second.value, optionLayer.second.blendStrength * throughput, optionValue.data);
845845
throughput *= (1.0f - optionLayer.second.blendStrength);
846-
} else {
847-
addWeightedValue(optionLayer.second.value, throughput, optionValue.data);
848846

849-
// For non-collection-like types, we always break after applying the weight
850-
if (type != OptionType::HashSet && type != OptionType::HashVector && type != OptionType::IntVector) {
847+
if (throughput < 0.0001f) {
851848
break;
852849
}
853-
854-
// For collection-like types, we only continue if the blend strength is high then threshold
850+
} else {
855851
if (optionLayer.second.blendStrength < optionLayer.second.blendThreshold) {
852+
continue;
853+
}
854+
addWeightedValue(optionLayer.second.value, throughput, optionValue.data);
855+
// For non-collection-like types, we always break after applying the weight
856+
if (type != OptionType::HashSet && type != OptionType::HashVector && type != OptionType::IntVector) {
856857
break;
857858
}
859+
858860
}
859861
}
860862

0 commit comments

Comments
 (0)