Skip to content

Commit 193d24f

Browse files
committed
Relax denoising for screenshots
1 parent 04316d9 commit 193d24f

31 files changed

+416
-520
lines changed

.github/actions/test-img/action.yml

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -28,30 +28,30 @@ runs:
2828
mkdir $WORK_DIR/${{ inputs.out-dir }}
2929
./${{ inputs.bin-name }} --prepare_assets pc --norun
3030
### transparent_machines
31-
./${{ inputs.bin-name }} ${{ inputs.test-args }} -s scenes/transparent_machines.json -ref references/transparent_machines_cycles.uncompressed.png -w 1000 -h 1000 --preset high --psnr 20.00 --no-postprocess
31+
./${{ inputs.bin-name }} ${{ inputs.test-args }} -s scenes/transparent_machines.json -ref references/transparent_machines_cycles.uncompressed.png -w 1000 -h 1000 --preset high --psnr 20.95 --no-postprocess
3232
mv transparent_machines.png transparent_machines_high.png
3333
cp transparent_machines_high.png $WORK_DIR/${{ inputs.out-dir }}
34-
./${{ inputs.bin-name }} ${{ inputs.test-args }} -s scenes/transparent_machines.json -ref references/transparent_machines_cycles.uncompressed.png -w 1000 -h 1000 --preset ultra --psnr 18.75 --no-postprocess
34+
./${{ inputs.bin-name }} ${{ inputs.test-args }} -s scenes/transparent_machines.json -ref references/transparent_machines_cycles.uncompressed.png -w 1000 -h 1000 --preset ultra --psnr 19.20 --no-postprocess
3535
mv transparent_machines.png transparent_machines_ultra.png
3636
cp transparent_machines_ultra.png $WORK_DIR/${{ inputs.out-dir }}
3737
### ai043_01
38-
./${{ inputs.bin-name }} ${{ inputs.test-args }} -s scenes/ai043_01.json -ref references/ai043_01_cycles.uncompressed.png -w 1400 -h 955 --preset medium --psnr 24.10 --no-postprocess
38+
./${{ inputs.bin-name }} ${{ inputs.test-args }} -s scenes/ai043_01.json -ref references/ai043_01_cycles.uncompressed.png -w 1400 -h 955 --preset medium --psnr 23.65 --no-postprocess
3939
mv ai043_01.png ai043_01_medium.png
4040
cp ai043_01_medium.png $WORK_DIR/${{ inputs.out-dir }}
41-
./${{ inputs.bin-name }} ${{ inputs.test-args }} -s scenes/ai043_01.json -ref references/ai043_01_cycles.uncompressed.png -w 1400 -h 955 --preset high --psnr 24.20 --no-postprocess
41+
./${{ inputs.bin-name }} ${{ inputs.test-args }} -s scenes/ai043_01.json -ref references/ai043_01_cycles.uncompressed.png -w 1400 -h 955 --preset high --psnr 23.15 --no-postprocess
4242
mv ai043_01.png ai043_01_high.png
4343
cp ai043_01_high.png $WORK_DIR/${{ inputs.out-dir }}
44-
./${{ inputs.bin-name }} ${{ inputs.test-args }} -s scenes/ai043_01.json -ref references/ai043_01_cycles.uncompressed.png -w 1400 -h 955 --preset ultra --psnr 25.05 --no-postprocess
44+
./${{ inputs.bin-name }} ${{ inputs.test-args }} -s scenes/ai043_01.json -ref references/ai043_01_cycles.uncompressed.png -w 1400 -h 955 --preset ultra --psnr 23.95 --no-postprocess
4545
mv ai043_01.png ai043_01_ultra.png
4646
cp ai043_01_ultra.png $WORK_DIR/${{ inputs.out-dir }}
4747
### Bistro (night)
48-
#./${{ inputs.bin-name }} ${{ inputs.test-args }} -s scenes/bistro.json -ref references/bistro_night_cycles.uncompressed.png -w 1920 -h 1080 --sun_dir 0 1 0 --exposure 3.25 --preset medium --psnr 20.50 --freeze-sky --no-postprocess
48+
#./${{ inputs.bin-name }} ${{ inputs.test-args }} -s scenes/bistro.json -ref references/bistro_night_cycles.uncompressed.png -w 1920 -h 1080 --sun_dir 0 1 0 --exposure 3.25 --preset medium --psnr 20.20 --freeze-sky --no-postprocess
4949
#mv bistro.png bistro_night_medium.png
5050
#cp bistro_night_medium.png $WORK_DIR/${{ inputs.out-dir }}
51-
./${{ inputs.bin-name }} ${{ inputs.test-args }} -s scenes/bistro.json -ref references/bistro_night_cycles.uncompressed.png -w 1920 -h 1080 --sun_dir 0 1 0 --exposure 3.25 --preset high --psnr 21.90 --freeze-sky --no-postprocess
51+
./${{ inputs.bin-name }} ${{ inputs.test-args }} -s scenes/bistro.json -ref references/bistro_night_cycles.uncompressed.png -w 1920 -h 1080 --sun_dir 0 1 0 --exposure 3.25 --preset high --psnr 21.95 --freeze-sky --no-postprocess
5252
mv bistro.png bistro_night_high.png
5353
cp bistro_night_high.png $WORK_DIR/${{ inputs.out-dir }}
54-
./${{ inputs.bin-name }} ${{ inputs.test-args }} -s scenes/bistro.json -ref references/bistro_night_cycles.uncompressed.png -w 1920 -h 1080 --sun_dir 0 1 0 --exposure 3.25 --preset ultra --psnr 21.80 --freeze-sky --no-postprocess
54+
./${{ inputs.bin-name }} ${{ inputs.test-args }} -s scenes/bistro.json -ref references/bistro_night_cycles.uncompressed.png -w 1920 -h 1080 --sun_dir 0 1 0 --exposure 3.25 --preset ultra --psnr 21.95 --freeze-sky --no-postprocess
5555
mv bistro.png bistro_night_ultra.png
5656
cp bistro_night_ultra.png $WORK_DIR/${{ inputs.out-dir }}
5757
### Coffee maker
@@ -81,7 +81,7 @@ runs:
8181
./${{ inputs.bin-name }} ${{ inputs.test-args }} -s scenes/staircase2.json -ref references/staircase_cycles.uncompressed.png -w 720 -h 900 --preset medium --psnr 23.40 --no-postprocess
8282
mv staircase2.png staircase2_medium.png
8383
cp staircase2_medium.png $WORK_DIR/${{ inputs.out-dir }}
84-
./${{ inputs.bin-name }} ${{ inputs.test-args }} -s scenes/staircase2.json -ref references/staircase_cycles.uncompressed.png -w 720 -h 900 --preset high --psnr 24.55 --no-postprocess
84+
./${{ inputs.bin-name }} ${{ inputs.test-args }} -s scenes/staircase2.json -ref references/staircase_cycles.uncompressed.png -w 720 -h 900 --preset high --psnr 24.50 --no-postprocess
8585
mv staircase2.png staircase2_high.png
8686
cp staircase2_high.png $WORK_DIR/${{ inputs.out-dir }}
8787
./${{ inputs.bin-name }} ${{ inputs.test-args }} -s scenes/staircase2.json -ref references/staircase_cycles.uncompressed.png -w 720 -h 900 --preset ultra --psnr 25.20 --no-postprocess
@@ -91,23 +91,23 @@ runs:
9191
mv staircase2.png staircase2_pt.png
9292
cp staircase2_pt.png $WORK_DIR/${{ inputs.out-dir }}
9393
### Bistro
94-
./${{ inputs.bin-name }} ${{ inputs.test-args }} -s scenes/bistro.json -ref references/bistro_cycles.uncompressed.png -w 1920 -h 1080 --exposure -11 --preset medium --psnr 21.75 --freeze-sky --no-postprocess
94+
./${{ inputs.bin-name }} ${{ inputs.test-args }} -s scenes/bistro.json -ref references/bistro_cycles.uncompressed.png -w 1920 -h 1080 --exposure -11 --preset medium --psnr 21.80 --freeze-sky --no-postprocess
9595
mv bistro.png bistro_medium.png
9696
cp bistro_medium.png $WORK_DIR/${{ inputs.out-dir }}
97-
./${{ inputs.bin-name }} ${{ inputs.test-args }} -s scenes/bistro.json -ref references/bistro_cycles.uncompressed.png -w 1920 -h 1080 --exposure -11 --preset high --psnr 22.30 --freeze-sky --no-postprocess
97+
./${{ inputs.bin-name }} ${{ inputs.test-args }} -s scenes/bistro.json -ref references/bistro_cycles.uncompressed.png -w 1920 -h 1080 --exposure -11 --preset high --psnr 22.24 --freeze-sky --no-postprocess
9898
mv bistro.png bistro_high.png
9999
cp bistro_high.png $WORK_DIR/${{ inputs.out-dir }}
100-
./${{ inputs.bin-name }} ${{ inputs.test-args }} -s scenes/bistro.json -ref references/bistro_cycles.uncompressed.png -w 1920 -h 1080 --exposure -11 --preset ultra --psnr 26.10 --freeze-sky --no-postprocess
100+
./${{ inputs.bin-name }} ${{ inputs.test-args }} -s scenes/bistro.json -ref references/bistro_cycles.uncompressed.png -w 1920 -h 1080 --exposure -11 --preset ultra --psnr 26.20 --freeze-sky --no-postprocess
101101
mv bistro.png bistro_ultra.png
102102
cp bistro_ultra.png $WORK_DIR/${{ inputs.out-dir }}
103103
### Sponza
104104
./${{ inputs.bin-name }} ${{ inputs.test-args }} -s scenes/sponza.json -ref references/sponza_cycles.uncompressed.png -w 1920 -h 1080 --exposure -8 --preset medium --psnr 22.05 --freeze-sky --no-postprocess
105105
mv sponza.png sponza_medium.png
106106
cp sponza_medium.png $WORK_DIR/${{ inputs.out-dir }}
107-
./${{ inputs.bin-name }} ${{ inputs.test-args }} -s scenes/sponza.json -ref references/sponza_cycles.uncompressed.png -w 1920 -h 1080 --exposure -8 --preset high --psnr 22.70 --freeze-sky --no-postprocess
107+
./${{ inputs.bin-name }} ${{ inputs.test-args }} -s scenes/sponza.json -ref references/sponza_cycles.uncompressed.png -w 1920 -h 1080 --exposure -8 --preset high --psnr 23.50 --freeze-sky --no-postprocess
108108
mv sponza.png sponza_high.png
109109
cp sponza_high.png $WORK_DIR/${{ inputs.out-dir }}
110-
./${{ inputs.bin-name }} ${{ inputs.test-args }} -s scenes/sponza.json -ref references/sponza_cycles.uncompressed.png -w 1920 -h 1080 --exposure -8 --preset ultra --psnr 24.70 --freeze-sky --no-postprocess
110+
./${{ inputs.bin-name }} ${{ inputs.test-args }} -s scenes/sponza.json -ref references/sponza_cycles.uncompressed.png -w 1920 -h 1080 --exposure -8 --preset ultra --psnr 26.45 --freeze-sky --no-postprocess
111111
mv sponza.png sponza_ultra.png
112112
cp sponza_ultra.png $WORK_DIR/${{ inputs.out-dir }}
113113
### ai043_06
@@ -117,7 +117,7 @@ runs:
117117
./${{ inputs.bin-name }} ${{ inputs.test-args }} -s scenes/ai043_06.json -ref references/ai043_06_cycles.uncompressed.png -w 1400 -h 935 --preset high --psnr 25.40 --no-postprocess
118118
mv ai043_06.png ai043_06_high.png
119119
cp ai043_06_high.png $WORK_DIR/${{ inputs.out-dir }}
120-
./${{ inputs.bin-name }} ${{ inputs.test-args }} -s scenes/ai043_06.json -ref references/ai043_06_cycles.uncompressed.png -w 1400 -h 935 --preset ultra --psnr 26.15 --no-postprocess
120+
./${{ inputs.bin-name }} ${{ inputs.test-args }} -s scenes/ai043_06.json -ref references/ai043_06_cycles.uncompressed.png -w 1400 -h 935 --preset ultra --psnr 26.25 --no-postprocess
121121
mv ai043_06.png ai043_06_ultra.png
122122
cp ai043_06_ultra.png $WORK_DIR/${{ inputs.out-dir }}
123123
./${{ inputs.bin-name }} ${{ inputs.test-args }} -s scenes/ai043_06.json -ref references/ai043_06_cycles.uncompressed.png -w 1400 -h 935 --pt --psnr 32.65 --no-postprocess

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# DummyEngine
22

3-
Cross platform Vulkan/OpenGL 3d engine for personal experimentation. Bundled with a lot of test scenes (using Git LFS).
3+
Cross platform Vulkan/OpenGL 3D engine for personal experimentation. Bundled with a lot of test scenes (using Git LFS).
44

55
Main reusable parts are extracted into the following libs:
66
- Realtime renderer: https://github.com/sergcpp/Eng

src/Eng/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ Features:
4444
<img src="images/sponza.jpg" width="67.359%" />
4545
</div>
4646
<div float="middle">
47-
<img src="images/pbr.png" width="65.1%" />
47+
<img src="images/pbr.jpg" width="65.1%" />
4848
<img src="images/transparent_machines.jpg" width="32.55%" />
4949
</div>
5050
</div>

src/Eng/images/ai043_01.jpg

-23 Bytes
Loading

src/Eng/images/ai043_06.jpg

123 Bytes
Loading

src/Eng/images/bistro.jpg

-1008 Bytes
Loading

src/Eng/images/bistro_night.jpg

3.22 KB
Loading

src/Eng/images/coffee_maker.jpg

16 Bytes
Loading

src/Eng/images/pbr.jpg

432 KB
Loading

src/Eng/images/pbr.png

-2.06 MB
Binary file not shown.

src/Eng/images/sponza.jpg

5.74 KB
Loading

src/Eng/images/staircase.jpg

5.75 KB
Loading
2.12 KB
Loading

src/Eng/renderer/Renderer.cpp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -619,6 +619,7 @@ void Eng::Renderer::ExecuteDrawList(const DrawList &list, const PersistentGpuDat
619619

620620
view_state_.env_generation = list.env.generation;
621621
view_state_.pre_exposure = readback_exposure();
622+
view_state_.prev_pre_exposure = std::min(std::max(view_state_.prev_pre_exposure, min_exposure_), max_exposure_);
622623

623624
if (list.render_settings.taa_mode != eTAAMode::Off) {
624625
const int samples_to_use =
@@ -1403,14 +1404,16 @@ void Eng::Renderer::ExecuteDrawList(const DrawList &list, const PersistentGpuDat
14031404

14041405
fg_builder_.Execute();
14051406

1406-
{ // store matrix to use it in next frame
1407+
{ // store info to use it in next frame
14071408
view_state_.down_buf_view_from_world = list.draw_cam.view_matrix();
14081409
view_state_.prev_cam_pos = list.draw_cam.world_position();
14091410
view_state_.prev_sun_dir = list.env.sun_dir;
14101411

14111412
view_state_.prev_clip_from_world = list.draw_cam.proj_matrix() * list.draw_cam.view_matrix();
14121413
view_state_.prev_view_from_world = list.draw_cam.view_matrix();
14131414
view_state_.prev_clip_from_view = list.draw_cam.proj_matrix_offset();
1415+
1416+
view_state_.prev_pre_exposure = view_state_.pre_exposure;
14141417
}
14151418

14161419
const uint64_t cpu_draw_end_us = Sys::GetTimeUs();

src/Eng/renderer/Renderer.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -225,7 +225,7 @@ class Renderer {
225225
Ren::Pipeline pi_ssr_classify_, pi_ssr_write_indirect_, pi_ssr_trace_hq_[2][2];
226226
Ren::Pipeline pi_rt_write_indirect_;
227227
// SSR Denoiser stuff
228-
Ren::Pipeline pi_ssr_reproject_, pi_ssr_prefilter_, pi_ssr_temporal_, pi_ssr_blur_[2], pi_ssr_stabilization_;
228+
Ren::Pipeline pi_ssr_reproject_, pi_ssr_prefilter_[2], pi_ssr_temporal_, pi_ssr_blur_[2], pi_ssr_stabilization_;
229229
// GI Cache
230230
Ren::Pipeline pi_probe_blend_[3][2], pi_probe_relocate_[3], pi_probe_classify_[3], pi_probe_sample_;
231231
// GTAO
@@ -234,7 +234,7 @@ class Renderer {
234234
Ren::Pipeline pi_gi_classify_, pi_gi_write_indirect_, pi_gi_trace_ss_;
235235
Ren::Pipeline pi_gi_rt_write_indirect_;
236236
// GI Denoiser stuff
237-
Ren::Pipeline pi_gi_reproject_, pi_gi_prefilter_, pi_gi_temporal_, pi_gi_blur_[2], pi_gi_stabilization_;
237+
Ren::Pipeline pi_gi_reproject_, pi_gi_prefilter_[2], pi_gi_temporal_, pi_gi_blur_[2], pi_gi_stabilization_;
238238
// Sun shadows
239239
Ren::Pipeline pi_shadow_classify_, pi_sun_shadows_, pi_shadow_prepare_mask_, pi_shadow_classify_tiles_,
240240
pi_shadow_filter_[3], pi_shadow_debug_;

src/Eng/renderer/Renderer_GIDiffuse.cpp

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -647,6 +647,7 @@ void Eng::Renderer::AddDiffusePasses(const Ren::WeakTex2DRef &env_map, const Ren
647647

648648
GIReproject::Params uniform_params;
649649
uniform_params.img_size = Ren::Vec2u{uint32_t(view_state_.act_res[0]), uint32_t(view_state_.act_res[1])};
650+
uniform_params.hist_weight = (view_state_.pre_exposure / view_state_.prev_pre_exposure);
650651

651652
DispatchComputeIndirect(pi_gi_reproject_, *indir_args_buf.ref, data->indir_args_offset, bindings,
652653
&uniform_params, sizeof(uniform_params), builder.ctx().default_descr_alloc(),
@@ -729,9 +730,9 @@ void Eng::Renderer::AddDiffusePasses(const Ren::WeakTex2DRef &env_map, const Ren
729730
GIPrefilter::Params uniform_params;
730731
uniform_params.img_size = Ren::Vec2u{uint32_t(view_state_.act_res[0]), uint32_t(view_state_.act_res[1])};
731732

732-
DispatchComputeIndirect(pi_gi_prefilter_, *indir_args_buf.ref, data->indir_args_offset, bindings,
733-
&uniform_params, sizeof(uniform_params), builder.ctx().default_descr_alloc(),
734-
builder.ctx().log());
733+
DispatchComputeIndirect(pi_gi_prefilter_[settings.taa_mode == eTAAMode::Static], *indir_args_buf.ref,
734+
data->indir_args_offset, bindings, &uniform_params, sizeof(uniform_params),
735+
builder.ctx().default_descr_alloc(), builder.ctx().log());
735736
});
736737
}
737738

src/Eng/renderer/Renderer_GISpecular.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -639,9 +639,9 @@ void Eng::Renderer::AddHQSpecularPasses(const bool deferred_shading, const bool
639639
SSRPrefilter::Params uniform_params;
640640
uniform_params.img_size = Ren::Vec2u{uint32_t(view_state_.act_res[0]), uint32_t(view_state_.act_res[1])};
641641

642-
DispatchComputeIndirect(pi_ssr_prefilter_, *indir_args_buf.ref, data->indir_args_offset, bindings,
643-
&uniform_params, sizeof(uniform_params), builder.ctx().default_descr_alloc(),
644-
builder.ctx().log());
642+
DispatchComputeIndirect(pi_ssr_prefilter_[settings.taa_mode == eTAAMode::Static], *indir_args_buf.ref,
643+
data->indir_args_offset, bindings, &uniform_params, sizeof(uniform_params),
644+
builder.ctx().default_descr_alloc(), builder.ctx().log());
645645
});
646646
}
647647

src/Eng/renderer/Renderer_Passes.cpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,8 @@ bool Eng::Renderer::InitPipelines() {
8585

8686
// Reflections denoising
8787
success &= init_pipeline(pi_ssr_reproject_, "internal/ssr_reproject.comp.glsl");
88-
success &= init_pipeline(pi_ssr_prefilter_, "internal/ssr_prefilter.comp.glsl");
88+
success &= init_pipeline(pi_ssr_prefilter_[0], "internal/ssr_prefilter.comp.glsl");
89+
success &= init_pipeline(pi_ssr_prefilter_[1], "internal/ssr_prefilter@RELAXED.comp.glsl");
8990
success &= init_pipeline(pi_ssr_temporal_, "internal/ssr_temporal.comp.glsl");
9091
success &= init_pipeline(pi_ssr_blur_[0], "internal/ssr_blur.comp.glsl");
9192
success &= init_pipeline(pi_ssr_blur_[1], "internal/ssr_blur@PER_PIXEL_KERNEL_ROTATION.comp.glsl");
@@ -119,7 +120,8 @@ bool Eng::Renderer::InitPipelines() {
119120
"internal/gi_trace_ss@NO_SUBGROUP.comp.glsl"));
120121
success &= init_pipeline(pi_gi_rt_write_indirect_, "internal/gi_write_indir_rt_dispatch.comp.glsl");
121122
success &= init_pipeline(pi_gi_reproject_, "internal/gi_reproject.comp.glsl");
122-
success &= init_pipeline(pi_gi_prefilter_, "internal/gi_prefilter.comp.glsl");
123+
success &= init_pipeline(pi_gi_prefilter_[0], "internal/gi_prefilter.comp.glsl");
124+
success &= init_pipeline(pi_gi_prefilter_[1], "internal/gi_prefilter@RELAXED.comp.glsl");
123125
success &= init_pipeline(pi_gi_temporal_, "internal/gi_temporal.comp.glsl");
124126
success &= init_pipeline(pi_gi_blur_[0], "internal/gi_blur.comp.glsl");
125127
success &= init_pipeline(pi_gi_blur_[1], "internal/gi_blur@PER_PIXEL_KERNEL_ROTATION.comp.glsl");

src/Eng/renderer/Renderer_Structs.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -379,7 +379,7 @@ struct ViewState {
379379
Ren::Mat4f clip_from_world, view_from_world, prev_view_from_world, prev_clip_from_world, down_buf_view_from_world,
380380
prev_clip_from_view;
381381
mutable Ren::Vec4f clip_info, frustum_info, rand_rotators[2];
382-
float pre_exposure = 1.0f;
382+
float pre_exposure = 1.0f, prev_pre_exposure = 1.0f;
383383
Ren::Quatf probe_ray_rotator;
384384
uint32_t probe_ray_hash = 0;
385385
uint32_t env_generation = 0xffffffff;

src/Eng/renderer/executors/ExPostprocess.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ void Eng::ExPostprocess::LazyInit(Ren::Context &ctx, Eng::ShaderLoader &sh) {
6262
if (!initialized) {
6363
blit_postprocess_prog_[0][0] = sh.LoadProgram(ctx, "internal/blit_postprocess.vert.glsl",
6464
"internal/blit_postprocess@ABERRATION;PURKINJE.frag.glsl");
65-
assert(blit_postprocess_prog_0][0]->ready());
65+
assert(blit_postprocess_prog_[0][0]->ready());
6666
blit_postprocess_prog_[0][1] =
6767
sh.LoadProgram(ctx, "internal/blit_postprocess.vert.glsl",
6868
"internal/blit_postprocess@ABERRATION;PURKINJE;TWO_TARGETS.frag.glsl");

src/Eng/renderer/shaders/gi_classify.comp.glsl

Lines changed: 1 addition & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -68,28 +68,7 @@ bool get_shared_bit(const uvec2 group_thread_id) {
6868
return (g_shared_bits[(group_thread_id.y * 8) / 32] & (1u << ((group_thread_id.y * 8 + group_thread_id.x) % 32))) != 0;
6969
}
7070

71-
// From https://github.com/GPUOpen-Effects/FidelityFX-Denoiser
72-
/**********************************************************************
73-
Copyright (c) 2021 Advanced Micro Devices, Inc. All rights reserved.
74-
75-
Permission is hereby granted, free of charge, to any person obtaining a copy
76-
of this software and associated documentation files (the "Software"), to deal
77-
in the Software without restriction, including without limitation the rights
78-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
79-
copies of the Software, and to permit persons to whom the Software is
80-
furnished to do so, subject to the following conditions:
81-
82-
The above copyright notice and this permission notice shall be included in
83-
all copies or substantial portions of the Software.
84-
85-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
86-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
87-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
88-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
89-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
90-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
91-
THE SOFTWARE.
92-
********************************************************************/
71+
// Taken from https://github.com/GPUOpen-Effects/FidelityFX-Denoiser
9372
void ClassifyTiles(uvec2 dispatch_thread_id, uvec2 group_thread_id, uvec2 screen_size, uint samples_per_quad,
9473
bool enable_temporal_variance_guided_tracing) {
9574
if (group_thread_id.x == 0u && group_thread_id.y == 0u) {

0 commit comments

Comments
 (0)