Code-Cleanup: All samples now use the camera class and it's matrices
Cleaned up base class
This commit is contained in:
parent
ab38f8b150
commit
48e7952fbf
4 changed files with 3 additions and 5 deletions
|
|
@ -240,9 +240,8 @@ public:
|
|||
{
|
||||
title = "Debugging with VK_EXT_debug_marker";
|
||||
settings.overlay = true;
|
||||
zoomSpeed = 2.5f;
|
||||
rotationSpeed = 0.5f;
|
||||
camera.setRotation(glm::vec3(-4.35f, 16.25f, 0.0f));
|
||||
camera.setRotationSpeed(0.5f);
|
||||
camera.setPosition(glm::vec3(0.1f, 1.1f, -8.5f));
|
||||
camera.setPerspective(60.0f, (float)width / (float)height, 0.1f, 256.0f);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -586,11 +586,11 @@ public:
|
|||
VulkanExample() : VulkanExampleBase(ENABLE_VALIDATION)
|
||||
{
|
||||
title = "Multi-part scene rendering";
|
||||
rotationSpeed = 0.5f;
|
||||
camera.type = Camera::CameraType::firstperson;
|
||||
camera.movementSpeed = 7.5f;
|
||||
camera.position = { 15.0f, -13.5f, 0.0f };
|
||||
camera.setRotation(glm::vec3(5.0f, 90.0f, 0.0f));
|
||||
camera.setRotationSpeed(0.5f);
|
||||
camera.setPerspective(60.0f, (float)width / (float)height, 0.1f, 256.0f);
|
||||
settings.overlay = true;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -120,7 +120,6 @@ public:
|
|||
camera.setPerspective(45.0f, (float)width / (float)height, zNear, zFar);
|
||||
camera.setRotation(glm::vec3(-20.5f, -673.0f, 0.0f));
|
||||
camera.setPosition(glm::vec3(0.0f, 0.0f, -175.0f));
|
||||
zoomSpeed = 10.0f;
|
||||
timerSpeed *= 0.25f;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -890,7 +890,7 @@ public:
|
|||
{
|
||||
uboVS.projection = camera.matrices.perspective;
|
||||
uboVS.model = camera.matrices.view;
|
||||
uboVS.viewPos = glm::vec4(0.0f, 0.0f, -zoom, 0.0f);
|
||||
uboVS.viewPos = camera.viewPos;
|
||||
|
||||
VK_CHECK_RESULT(uniformBufferVS.map());
|
||||
memcpy(uniformBufferVS.mapped, &uboVS, sizeof(uboVS));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue