From 5011d7afae44c91ec674634b3c9e63688dc7f01f Mon Sep 17 00:00:00 2001 From: Sascha Willems Date: Tue, 23 Apr 2019 08:16:35 +0200 Subject: [PATCH] Storage usage flags for scene --- examples/nv_ray_tracing_shadows/nv_ray_tracing_shadows.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/examples/nv_ray_tracing_shadows/nv_ray_tracing_shadows.cpp b/examples/nv_ray_tracing_shadows/nv_ray_tracing_shadows.cpp index e7d6d033..933d1ab3 100644 --- a/examples/nv_ray_tracing_shadows/nv_ray_tracing_shadows.cpp +++ b/examples/nv_ray_tracing_shadows/nv_ray_tracing_shadows.cpp @@ -259,8 +259,11 @@ public: void createScene() { // Instead of a simple triangle, we'll be loading a more complex scene for this example - scene.loadFromFile(getAssetPath() + "models/vulkanscene_shadow.dae", vertexLayout, 0.25f, vulkanDevice, queue); - //scene.loadFromFile(getAssetPath() + "models/Mini_Diorama_01.dae", vertexLayout, 0.25f, vulkanDevice, queue); + vks::ModelCreateInfo modelCI{}; + modelCI.scale = glm::vec3(0.25f); + // The shaders are accessing the vertex and index buffers of the scene, so the proper usage flag has to be set + modelCI.memoryPropertyFlags = VK_BUFFER_USAGE_STORAGE_BUFFER_BIT; + scene.loadFromFile(getAssetPath() + "models/vulkanscene_shadow.dae", vertexLayout, &modelCI, vulkanDevice, queue); /* Create the bottom level acceleration structure containing the actual scene geometry