|
Estella 0.113.0
A fast 2D and 3D game engine powered by WebAssembly and ECS
|
What this view already has something solid in front of. More...
#include "../../core/Types.hpp"#include <glm/glm.hpp>#include <glm/gtc/quaternion.hpp>#include <algorithm>#include <array>#include <cmath>#include <limits>

Go to the source code of this file.
Classes | |
| class | esengine::OcclusionView |
| The depths this view is blocked at, and the test a bound asks it. More... | |
Namespaces | |
| namespace | esengine |
What this view already has something solid in front of.
The other half of the cull, beside Frustum: one says what is outside the view, this says what is inside it and hidden. Both are asked through one predicate (RenderCollectContext::visible) so a renderable cannot be judged by one of them and not the other.
A DEPTH GRID, not a query: the collect may not touch the device (RenderFrame's first invariant), and a GPU occlusion query answers a frame late through a readback the WebGL2 path would stall on. Solid boxes an author declared are rasterised onto a small grid here, and every bound is tested against it before it becomes a draw.
Conservative in one direction ON PURPOSE. Claiming too little costs draws that were already being paid; claiming too much makes objects vanish in front of the player, which no counter shows and no gate catches. Everything below rounds towards drawing: only texels a face covers WHOLE take a depth, that depth is the face's farthest point over the texel, and a box that reaches behind the eye is dropped rather than approximated.
Definition in file OcclusionView.hpp.