Skip to content

Commit

Permalink
enable display
Browse files Browse the repository at this point in the history
  • Loading branch information
Mike-Leo-Smith committed Dec 6, 2023
1 parent 21be15c commit 5eb5795
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
12 changes: 8 additions & 4 deletions data/scenes/cbox-diff/cbox-diff-2.luisa
Original file line number Diff line number Diff line change
Expand Up @@ -124,11 +124,15 @@ Film film : Color {
exposure { 0 }
}

FIlm display : Display {
base { @film }
}

Camera camera : Pinhole {
position { 0.0, 1.0, 5.0 }
fov { 27.8 }
spp { 1024 }
film { @film }
spp { 64 }
film { @display }
file { "../../renders/cbox-diff.exr" }
filter : Gaussian {
radius { 1 }
Expand All @@ -147,10 +151,10 @@ Integrator pt : MegaReplayDiff {
display_camera_index { 0 }
save_process { true }
loss : L2 {}
iterations { 100 }
iterations { 1000 }

optimizer : Adam {
learning_rate { 0.003 }
learning_rate { 0.3 }
}
}

Expand Down
1 change: 1 addition & 0 deletions src/integrators/mega_replay_diff.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -800,6 +800,7 @@ void MegakernelReplayDiffInstance::_render_one_camera(
command_buffer << render_shader(iteration * spp + sample_id++,
s.point.time, s.point.weight)
.dispatch(resolution);
camera->film()->show(command_buffer);
if (++dispatch_count % dispatches_per_commit == 0u) [[unlikely]] {
dispatch_count = 0u;
auto p = sample_id / static_cast<double>(spp);
Expand Down

0 comments on commit 5eb5795

Please sign in to comment.