From 2a0ae81adcea3d2bdcf6674d2822f34d22497e1d Mon Sep 17 00:00:00 2001 From: Alexander Gauggel <agauggel@uni-koblenz.de> Date: Thu, 17 Jun 2021 13:50:15 +0200 Subject: [PATCH] [#70] Fix lighting again --- projects/voxelization/src/main.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/projects/voxelization/src/main.cpp b/projects/voxelization/src/main.cpp index 1b9193c0..0a419ddd 100644 --- a/projects/voxelization/src/main.cpp +++ b/projects/voxelization/src/main.cpp @@ -360,7 +360,7 @@ int main(int argc, const char** argv) { vulkanCorrectionMatrix[3][2] = 0.5; projectionLight = vulkanCorrectionMatrix * projectionLight; - const glm::mat4 viewLight = glm::lookAt(glm::vec3(0), lightInfo.direction, glm::vec3(0, -1, 0)); + const glm::mat4 viewLight = glm::lookAt(glm::vec3(0), -lightInfo.direction, glm::vec3(0, -1, 0)); lightInfo.lightMatrix = projectionLight * viewLight; lightBuffer.fill({ lightInfo }); @@ -378,7 +378,6 @@ int main(int argc, const char** argv) { const std::vector<vkcv::ImageHandle> renderTargets = { colorBuffer, depthBuffer }; const vkcv::PushConstantData shadowPushConstantData((void*)mvpLight.data(), sizeof(glm::mat4)); - auto cmdStream = core.createCommandStream(vkcv::QueueType::Graphics); -- GitLab