Implemented basic occlusions queries

This commit is contained in:
Dynamitos
2024-06-11 16:55:20 +02:00
parent 52c4f11d28
commit df7fbef8bd
20 changed files with 221 additions and 156 deletions
+1 -3
View File
@@ -16,8 +16,6 @@
using namespace Seele;
extern bool useViewCulling;
BasePass::BasePass(Gfx::PGraphics graphics, PScene scene) : RenderPass(graphics, scene) {
basePassLayout = graphics->createPipelineLayout("BasePassLayout");
@@ -93,7 +91,7 @@ void BasePass::render() {
Array<Gfx::ORenderCommand> commands;
Gfx::ShaderPermutation permutation = graphics->getShaderCompiler()->getTemplate("BasePass");
permutation.setViewCulling(useViewCulling);
permutation.setDepthCulling(true); // always use the culling info
for (VertexData* vertexData : VertexData::getList()) {
vertexData->getInstanceDataSet()->updateBuffer(6, cullingBuffer);
vertexData->getInstanceDataSet()->writeChanges();