forked from 1b-agent/opencadstudio-upstream
perf(render): batch and cull mesh instances
Share repeated block geometry across GPU instances.\n\nPatch changed mesh chunks and cull large batches with indirect draws.
This commit is contained in:
1 parent
b5f9a06e78
commit
4887a53d66
8 files changed
+1747
-400
No files matched your search
+4
-2
@@ -557,10 +557,11 @@ impl Scene {
|
||||
})
|
||||
})
|
||||
.collect();
|
||||
for (handle, mesh, top_level) in built {
|
||||
for (handle, mut mesh, top_level) in built {
|
||||
if top_level {
|
||||
self.meshes.insert(handle, mesh);
|
||||
} else {
|
||||
mesh.prepare_instance_source(handle);
|
||||
self.block_meshes.insert(handle, mesh);
|
||||
}
|
||||
}
|
||||
@@ -2232,10 +2233,11 @@ impl Scene {
|
||||
})
|
||||
})
|
||||
.collect();
|
||||
for (handle, m, top_level) in built {
|
||||
for (handle, mut m, top_level) in built {
|
||||
if top_level {
|
||||
self.meshes.insert(handle, m);
|
||||
} else {
|
||||
m.prepare_instance_source(handle);
|
||||
self.block_meshes.insert(handle, m);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user