Skip to content
Snippets Groups Projects
Commit 2a0ae81a authored by Alexander Gauggel's avatar Alexander Gauggel
Browse files

[#70] Fix lighting again

parent 600f222d
No related branches found
No related tags found
1 merge request!57Resolve "Basic voxelization"
Pipeline #25808 passed
...@@ -360,7 +360,7 @@ int main(int argc, const char** argv) { ...@@ -360,7 +360,7 @@ int main(int argc, const char** argv) {
vulkanCorrectionMatrix[3][2] = 0.5; vulkanCorrectionMatrix[3][2] = 0.5;
projectionLight = vulkanCorrectionMatrix * projectionLight; 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; lightInfo.lightMatrix = projectionLight * viewLight;
lightBuffer.fill({ lightInfo }); lightBuffer.fill({ lightInfo });
...@@ -378,7 +378,6 @@ int main(int argc, const char** argv) { ...@@ -378,7 +378,6 @@ int main(int argc, const char** argv) {
const std::vector<vkcv::ImageHandle> renderTargets = { colorBuffer, depthBuffer }; const std::vector<vkcv::ImageHandle> renderTargets = { colorBuffer, depthBuffer };
const vkcv::PushConstantData shadowPushConstantData((void*)mvpLight.data(), sizeof(glm::mat4)); const vkcv::PushConstantData shadowPushConstantData((void*)mvpLight.data(), sizeof(glm::mat4));
auto cmdStream = core.createCommandStream(vkcv::QueueType::Graphics); auto cmdStream = core.createCommandStream(vkcv::QueueType::Graphics);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment