17
0
mirror of https://github.com/MaSzyna-EU07/maszyna.git synced 2026-10-31 00:50:29 +01:00

feat(gl46): leave out instance buckets beyond their range before the culling

This commit is contained in:
2026-10-20 14:57:30 +02:00
parent 07ac7406a0
commit dfbe8a6d9e
7 changed files with 70 additions and 1 deletions

View File

@@ -268,6 +268,7 @@ public:
mutable std::vector<instance_record> records; // copies for the instances, in the same order
mutable glm::dvec3 recordorigin { 0.0 }; // the records hold locations relative to it
mutable float lodrangesquared { 0.f }; // past it no submodel of the model of the bucket is drawn
mutable float rangesquared { std::numeric_limits<float>::max() }; // past it no instance of the bucket is drawn: the largest range of its instances, within lodrangesquared
mutable unsigned int recordsversion { 0 };
// place of the records in the record buffer of the gpu culling: first record, room, and the generation of
// the buffer it is good for. gpustale: the records changed since they were sent