Skip to content

Commit

Permalink
path tracing minor fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
turanszkij committed Feb 11, 2024
1 parent 57985ed commit 7a748ea
Showing 1 changed file with 3 additions and 11 deletions.
14 changes: 3 additions & 11 deletions WickedEngine/wiRenderPath3D_PathTracing.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,6 @@ namespace wi
desc.format = Format::R32_FLOAT;
device->CreateTexture(&desc, nullptr, &traceDepth);
device->SetName(&traceDepth, "traceDepth");
device->CreateTexture(&desc, nullptr, &traceDepth);
device->SetName(&traceDepth, "traceDepth");
desc.format = Format::R8_UINT;
device->CreateTexture(&desc, nullptr, &traceStencil);
device->SetName(&traceStencil, "traceStencil");
Expand Down Expand Up @@ -142,8 +140,7 @@ namespace wi
wi::renderer::CreateLuminanceResources(luminanceResources, internalResolution);
wi::renderer::CreateBloomResources(bloomResources, internalResolution);

// also reset accumulation buffer state:
sam = -1;
resetProgress();

RenderPath2D::ResizeBuffers(); // we don't need to use any buffers from RenderPath3D, so skip those
}
Expand All @@ -155,7 +152,7 @@ namespace wi
if (camera->IsDirty())
{
camera->SetDirty(false);
sam = -1;
resetProgress();
}
else
{
Expand Down Expand Up @@ -190,10 +187,6 @@ namespace wi
{
sam = target;
}
if (target < sam)
{
resetProgress();
}

scene->SetAccelerationStructureUpdateRequested(sam == 0);
setSceneUpdateEnabled(sam == 0);
Expand Down Expand Up @@ -314,7 +307,6 @@ namespace wi

if (sam < target)
{

CommandList cmd_copypages;
if (scene->terrains.GetCount() > 0)
{
Expand Down Expand Up @@ -343,7 +335,7 @@ namespace wi
{
wi::renderer::UpdateRaytracingAccelerationStructures(*scene, cmd);
}
});
});

// Main scene:
cmd = device->BeginCommandList();
Expand Down

0 comments on commit 7a748ea

Please sign in to comment.