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

@@ -352,6 +352,7 @@ void
basic_cell::insert( TAnimModel *Instance ) {
m_active = true;
m_instancecache.boundsversion = 0; // the renderer builds it anew
auto const flags = Instance->Flags();
auto alpha =
@@ -454,6 +455,8 @@ basic_cell::unregister_end( TTrack *Path ) {
void
basic_cell::erase( TAnimModel *Instance ) {
m_instancecache.boundsversion = 0; // the renderer builds it anew
auto const flags = Instance->Flags();
auto alpha =
Instance->Material() != nullptr ? Instance->Material()->textures_alpha : 0x30300030;