loading cam from file and flake update
This commit is contained in:
parent
916e68443f
commit
39ac0cf6c7
4 changed files with 9 additions and 9 deletions
6
flake.lock
generated
6
flake.lock
generated
|
|
@ -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": {
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
||||
|
|
|
|||
|
|
@ -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
|
||||
};
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue