Skip to content

Commit

Permalink
improvements for multiple renderpath usage
Browse files Browse the repository at this point in the history
  • Loading branch information
turanszkij committed Feb 13, 2024
1 parent a4ac425 commit a73f92b
Show file tree
Hide file tree
Showing 6 changed files with 118 additions and 114 deletions.
33 changes: 18 additions & 15 deletions WickedEngine/wiRenderPath3D.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -790,7 +790,7 @@ namespace wi
);
}

if (wi::renderer::GetDDGIEnabled())
if (wi::renderer::GetDDGIEnabled() && getSceneUpdateEnabled())
{
wi::renderer::DDGI(
*scene,
Expand Down Expand Up @@ -1032,7 +1032,7 @@ namespace wi
});
}

if (wi::renderer::GetVXGIEnabled())
if (wi::renderer::GetVXGIEnabled() && getSceneUpdateEnabled())
{
cmd = device->BeginCommandList();
wi::jobsystem::Execute(ctx, [cmd, this](wi::jobsystem::JobArgs args) {
Expand All @@ -1041,19 +1041,22 @@ namespace wi
}

// Updating textures:
cmd = device->BeginCommandList();
device->WaitCommandList(cmd, cmd_prepareframe_async);
wi::jobsystem::Execute(ctx, [cmd, this](wi::jobsystem::JobArgs args) {
wi::renderer::BindCommonResources(cmd);
wi::renderer::BindCameraCB(
*camera,
camera_previous,
camera_reflection,
cmd
);
wi::renderer::RefreshLightmaps(*scene, cmd);
wi::renderer::RefreshEnvProbes(visibility_main, cmd);
});
if (getSceneUpdateEnabled())
{
cmd = device->BeginCommandList();
device->WaitCommandList(cmd, cmd_prepareframe_async);
wi::jobsystem::Execute(ctx, [cmd, this](wi::jobsystem::JobArgs args) {
wi::renderer::BindCommonResources(cmd);
wi::renderer::BindCameraCB(
*camera,
camera_previous,
camera_reflection,
cmd
);
wi::renderer::RefreshLightmaps(*scene, cmd);
wi::renderer::RefreshEnvProbes(visibility_main, cmd);
});
}

if (visibility_main.IsRequestedPlanarReflections())
{
Expand Down
Loading

0 comments on commit a73f92b

Please sign in to comment.