mirror of
https://github.com/MaSzyna-EU07/maszyna.git
synced 2026-11-08 17:26:22 +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:
@@ -302,6 +302,12 @@ class opengl33_renderer : public gfx_renderer {
|
||||
// adds the bucketed instances of a scene cell to the frame-level buckets drawn by Render_Instanced(),
|
||||
// less the ones the copies of their bounds show to be out of sight in the current render pass
|
||||
void Queue_Instances( scene::basic_cell const *Cell );
|
||||
// brings up to date what the renderer keeps of the instances of the cell; returns: true if the cache can be used
|
||||
bool Prepare_Instances( scene::basic_cell &Cell );
|
||||
// true if the cache of the cell is up to date
|
||||
bool Instance_Cache_Valid( scene::basic_cell const &Cell ) const;
|
||||
// true if nothing of the cell would be drawn by the color pass from the camera of the pass
|
||||
bool Cell_Out_Of_Range( scene::basic_cell const &Cell ) const;
|
||||
// makes the copies of the bounds of the instances held by a bucket of a scene cell
|
||||
void Update_Instance_Bounds( TModel3d const *Model, scene::basic_cell::instance_bucket const &Bucket );
|
||||
bool Render(TDynamicObject *Dynamic);
|
||||
|
||||
Reference in New Issue
Block a user