diff --git a/flake.lock b/flake.lock index df4c399..3acb18d 100644 --- a/flake.lock +++ b/flake.lock @@ -2,11 +2,11 @@ "nodes": { "nixpkgs": { "locked": { - "lastModified": 1715266358, - "narHash": "sha256-doPgfj+7FFe9rfzWo1siAV2mVCasW+Bh8I1cToAXEE4=", + "lastModified": 1715787315, + "narHash": "sha256-cYApT0NXJfqBkKcci7D9Kr4CBYZKOQKDYA23q8XNuWg=", "owner": "nixos", "repo": "nixpkgs", - "rev": "f1010e0469db743d14519a1efd37e23f8513d714", + "rev": "33d1e753c82ffc557b4a585c77de43d4c922ebb5", "type": "github" }, "original": { diff --git a/ray_tracing_gltf/hello_vulkan.cpp b/ray_tracing_gltf/hello_vulkan.cpp index a342fc6..9c605c6 100644 --- a/ray_tracing_gltf/hello_vulkan.cpp +++ b/ray_tracing_gltf/hello_vulkan.cpp @@ -735,11 +735,11 @@ void HelloVulkan::createRtPipeline() VkPipelineShaderStageCreateInfo stage{VK_STRUCTURE_TYPE_PIPELINE_SHADER_STAGE_CREATE_INFO}; stage.pName = "main"; // All the same entry point // Raygen - stage.module = nvvk::createShaderModule(m_device, nvh::loadFile("spv/pathtrace.rgen.spv", true, defaultSearchPaths, true)); + stage.module = nvvk::createShaderModule(m_device, nvh::loadFile("spv/raytrace.rgen.spv", true, defaultSearchPaths, true)); stage.stage = VK_SHADER_STAGE_RAYGEN_BIT_KHR; stages[eRaygen] = stage; // Miss - stage.module = nvvk::createShaderModule(m_device, nvh::loadFile("spv/pathtrace.rmiss.spv", true, defaultSearchPaths, true)); + stage.module = nvvk::createShaderModule(m_device, nvh::loadFile("spv/raytrace.rmiss.spv", true, defaultSearchPaths, true)); stage.stage = VK_SHADER_STAGE_MISS_BIT_KHR; stages[eMiss] = stage; // The second miss shader is invoked when a shadow ray misses the geometry. It simply indicates that no occlusion has been found @@ -748,7 +748,7 @@ void HelloVulkan::createRtPipeline() stage.stage = VK_SHADER_STAGE_MISS_BIT_KHR; stages[eMiss2] = stage; // Hit Group - Closest Hit - stage.module = nvvk::createShaderModule(m_device, nvh::loadFile("spv/pathtrace.rchit.spv", true, defaultSearchPaths, true)); + stage.module = nvvk::createShaderModule(m_device, nvh::loadFile("spv/raytrace.rchit.spv", true, defaultSearchPaths, true)); stage.stage = VK_SHADER_STAGE_CLOSEST_HIT_BIT_KHR; stages[eClosestHit] = stage; diff --git a/ray_tracing_gltf/hello_vulkan.h b/ray_tracing_gltf/hello_vulkan.h index d004e60..eb438ed 100644 --- a/ray_tracing_gltf/hello_vulkan.h +++ b/ray_tracing_gltf/hello_vulkan.h @@ -67,9 +67,9 @@ public: // Information pushed at each draw call PushConstantRaster m_pcRaster{ {1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1}, // Identity matrix - {0.f, 4.5f, 0.f}, // light position + {0.f, 100.f, 0.f}, // light position 0, // instance Id - 10.f, // light intensity + 1000.f, // light intensity 0, // light type 0 // material id }; diff --git a/ray_tracing_gltf/shaders/pathtrace.rgen b/ray_tracing_gltf/shaders/pathtrace.rgen index c1d0eb2..eef5ed7 100644 --- a/ray_tracing_gltf/shaders/pathtrace.rgen +++ b/ray_tracing_gltf/shaders/pathtrace.rgen @@ -65,7 +65,7 @@ void main() vec3 curWeight = vec3(1); vec3 hitValue = vec3(0); - for(; prd.depth < 10; prd.depth++) + for(; prd.depth < 100; prd.depth++) { traceRayEXT(topLevelAS, // acceleration structure rayFlags, // rayFlags