17
0
mirror of https://github.com/MaSzyna-EU07/maszyna.git synced 2026-11-08 14:59:43 +01:00

Instancing: skip the buckets of a cell lying wholly beyond the range of their instances (#225)

* perf(instancing): skip a cell's buckets lying wholly beyond the range of their instances

* perf(instancing): go only through the instances drawn one by one in the per-node pass

* perf(instancing): leave out of the color pass the cells holding only instances too far to be drawn

* refactor(instancing): keep the caches of the instances of a cell without mutable fields, set by the renderer when the cell is queued
This commit is contained in:
pawelw
2026-11-07 12:35:55 +01:00
committed by GitHub
parent 3a29a165a9
commit 55ba7a9f41
6 changed files with 119 additions and 2 deletions

View File

@@ -237,6 +237,9 @@ public:
// diagnostic counters (process-wide). Updated inside update_instanceable_flag()
// so the renderer can surface load-time classification stats in the debug overlay.
static int s_instanceable_total; // count of TAnimModel*'s classified instanceable
// bumped whenever an instance loses its instanceable status after it was put in a scene cell (an event adds
// an animation container, or changes a skin); the cells rebuild their lists of instances drawn one by one then
static unsigned int s_instanceable_revoked;
static int s_classified_total; // count of TAnimModel*'s that ran through the classifier
static int s_rejected_no_pmodel;
static int s_rejected_lights;