summaryrefslogtreecommitdiffstats
path: root/modules
diff options
context:
space:
mode:
authorDario <dariosamo@gmail.com>2023-09-29 12:10:36 -0300
committerDario <dariosamo@gmail.com>2023-09-29 12:36:36 -0300
commitac90ca714c29f110ccbd3bb89a15f6da726c3203 (patch)
tree5997766fe4f489dac0a2d543e3def4b8547fb739 /modules
parent19890614c6a78ec36030ce65c7da05f07fcdb9ed (diff)
downloadredot-engine-ac90ca714c29f110ccbd3bb89a15f6da726c3203.tar.gz
Make the lightmapper not dilate before denoising.
Dilating noisy data caused issues for the denoiser. Fixes #82526.
Diffstat (limited to 'modules')
-rw-r--r--modules/lightmapper_rd/lightmapper_rd.cpp20
1 files changed, 6 insertions, 14 deletions
diff --git a/modules/lightmapper_rd/lightmapper_rd.cpp b/modules/lightmapper_rd/lightmapper_rd.cpp
index e9550f9c28..556b0b4374 100644
--- a/modules/lightmapper_rd/lightmapper_rd.cpp
+++ b/modules/lightmapper_rd/lightmapper_rd.cpp
@@ -1493,14 +1493,6 @@ LightmapperRD::BakeError LightmapperRD::bake(BakeQuality p_quality, bool p_use_d
}
#endif
- {
- SWAP(light_accum_tex, light_accum_tex2);
- BakeError error = _dilate(rd, compute_shader, compute_base_uniform_set, push_constant, light_accum_tex2, light_accum_tex, atlas_size, atlas_slices * (p_bake_sh ? 4 : 1));
- if (unlikely(error != BAKE_OK)) {
- return error;
- }
- }
-
/* DENOISE */
if (p_use_denoiser) {
@@ -1515,13 +1507,13 @@ LightmapperRD::BakeError LightmapperRD::bake(BakeQuality p_quality, bool p_use_d
return error;
}
}
+ }
- {
- SWAP(light_accum_tex, light_accum_tex2);
- BakeError error = _dilate(rd, compute_shader, compute_base_uniform_set, push_constant, light_accum_tex2, light_accum_tex, atlas_size, atlas_slices * (p_bake_sh ? 4 : 1));
- if (unlikely(error != BAKE_OK)) {
- return error;
- }
+ {
+ SWAP(light_accum_tex, light_accum_tex2);
+ BakeError error = _dilate(rd, compute_shader, compute_base_uniform_set, push_constant, light_accum_tex2, light_accum_tex, atlas_size, atlas_slices * (p_bake_sh ? 4 : 1));
+ if (unlikely(error != BAKE_OK)) {
+ return error;
}
}