fixing light culling

This commit is contained in:
Dynamitos
2024-02-23 08:31:21 +01:00
parent 15813ba612
commit a3f5ad2841
8 changed files with 37 additions and 24 deletions
@@ -169,7 +169,6 @@ void BasePass::render()
}
graphics->executeCommands(commands);
graphics->endRenderPass();
vkDeviceWaitIdle(((Vulkan::Graphics*)graphics.getHandle())->getDevice());
}
void BasePass::endFrame()
@@ -28,6 +28,7 @@ void RenderPass::beginFrame(const Component::Camera& cam)
viewParams = {
.viewMatrix = cam.getViewMatrix(),
.projectionMatrix = viewport->getProjectionMatrix(),
.inverseProjection = glm::inverse(viewport->getProjectionMatrix()),
.cameraPosition = Vector4(cam.getCameraPosition(), 1),
.screenDimensions = Vector2(static_cast<float>(viewport->getWidth()), static_cast<float>(viewport->getHeight())),
};
@@ -31,6 +31,7 @@ protected:
{
Matrix4 viewMatrix;
Matrix4 projectionMatrix;
Matrix4 inverseProjection;
Vector4 cameraPosition;
Vector2 screenDimensions;
} viewParams;