Example setup

This commit is contained in:
saschawillems 2016-09-04 14:28:43 +02:00
parent 7fee0ddb05
commit 228572c063
2 changed files with 3 additions and 4 deletions

View file

@ -142,7 +142,9 @@ public:
title = "Vulkan Example - Deferred shading (2016 by Sascha Willems)";
camera.type = Camera::CameraType::firstperson;
camera.movementSpeed = 5.0f;
#ifndef __ANDROID__
camera.rotationSpeed = 0.25f;
#endif
camera.position = { 2.15f, 0.3f, -8.75f };
camera.setRotation(glm::vec3(-0.75f, 12.5f, 0.0f));
camera.setPerspective(60.0f, (float)width / (float)height, 0.1f, 256.0f);

View file

@ -95,8 +95,7 @@ public:
title = "Vulkan Example - Compute shader ray tracing";
enableTextOverlay = true;
compute.ubo.aspectRatio = (float)width / (float)height;
paused = true;
timerSpeed *= 0.5f;
timerSpeed *= 0.25f;
camera.type = Camera::CameraType::lookat;
camera.setPerspective(60.0f, (float)width / (float)height, 0.1f, 512.0f);
@ -676,9 +675,7 @@ public:
compute.ubo.lightPos.x = 0.0f + sin(glm::radians(timer * 360.0f)) * cos(glm::radians(timer * 360.0f)) * 2.0f;
compute.ubo.lightPos.y = 0.0f + sin(glm::radians(timer * 360.0f)) * 2.0f;
compute.ubo.lightPos.z = 0.0f + cos(glm::radians(timer * 360.0f)) * 2.0f;
compute.ubo.camera.pos = camera.position * -1.0f;
VK_CHECK_RESULT(compute.uniformBuffer.map());
memcpy(compute.uniformBuffer.mapped, &compute.ubo, sizeof(compute.ubo));
compute.uniformBuffer.unmap();