From 5eb5795f7c37a7f5fe49b1c1e21276241c154c67 Mon Sep 17 00:00:00 2001 From: Mike Date: Wed, 6 Dec 2023 23:37:21 +0800 Subject: [PATCH] enable display --- data/scenes/cbox-diff/cbox-diff-2.luisa | 12 ++++++++---- src/integrators/mega_replay_diff.cpp | 1 + 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/data/scenes/cbox-diff/cbox-diff-2.luisa b/data/scenes/cbox-diff/cbox-diff-2.luisa index 5a7653fe..586cfc24 100644 --- a/data/scenes/cbox-diff/cbox-diff-2.luisa +++ b/data/scenes/cbox-diff/cbox-diff-2.luisa @@ -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 } @@ -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 } } } diff --git a/src/integrators/mega_replay_diff.cpp b/src/integrators/mega_replay_diff.cpp index 0a40c83d..561bea0b 100644 --- a/src/integrators/mega_replay_diff.cpp +++ b/src/integrators/mega_replay_diff.cpp @@ -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(spp);