mirror of
https://github.com/redstrate/Novus.git
synced 2025-04-25 13:17:46 +00:00
Fix camera position in mdlviewer
This commit is contained in:
parent
1142d1c143
commit
4fab565843
1 changed files with 1 additions and 1 deletions
|
@ -430,7 +430,7 @@ void Renderer::render(std::vector<RenderModel> models) {
|
||||||
glm::mat4 p = glm::perspective(glm::radians(45.0f), swapchainExtent.width / (float) swapchainExtent.height,
|
glm::mat4 p = glm::perspective(glm::radians(45.0f), swapchainExtent.width / (float) swapchainExtent.height,
|
||||||
0.1f, 100.0f);
|
0.1f, 100.0f);
|
||||||
p[1][1] *= -1;
|
p[1][1] *= -1;
|
||||||
glm::mat4 v = glm::lookAt(glm::vec3(3), glm::vec3(0, 1, 0), glm::vec3(0, 1, 0));
|
glm::mat4 v = glm::lookAt(glm::vec3(0, 0, -3), glm::vec3(0, 1, 0), glm::vec3(0, 1, 0));
|
||||||
glm::mat4 vp = p * v;
|
glm::mat4 vp = p * v;
|
||||||
|
|
||||||
vkCmdPushConstants(commandBuffer, pipelineLayout, VK_SHADER_STAGE_VERTEX_BIT, 0, sizeof(glm::mat4), &vp);
|
vkCmdPushConstants(commandBuffer, pipelineLayout, VK_SHADER_STAGE_VERTEX_BIT, 0, sizeof(glm::mat4), &vp);
|
||||||
|
|
Loading…
Add table
Reference in a new issue