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

Let the instances drawn from the GPU hide one another, in two phases

This commit is contained in:
2026-10-17 21:50:23 +02:00
parent 918c056b83
commit 5a5c67aaaf
14 changed files with 367 additions and 129 deletions

View File

@@ -247,7 +247,7 @@ public:
float rangesquaredmin { 0.f }; // visibility range of the instance
float rangesquaredmax { 0.f };
std::uint32_t flags { 0 }; // instance_record_flags
std::uint32_t pad { 0 };
std::uint32_t pad { 0 }; // the copy of the gpu culling keeps there whether the instance was seen in the last frame
glm::vec4 rotationscale[ 3 ] {}; // columns of rotation and scale of the instance, w unused
};
static_assert( sizeof( instance_record ) == 80, "instance_record has to keep its std430 layout" );