summaryrefslogtreecommitdiff
path: root/modules/lightmapper_rd
diff options
context:
space:
mode:
authorWilliam Deurwaarder <william.git@xs4all.nl>2021-10-16 11:23:47 +0200
committerWilliam Deurwaarder <william.git@xs4all.nl>2021-10-16 11:28:37 +0200
commit5465ef83cb16634de54f3aba0bd9d28cdc450590 (patch)
treec1b6e16530d8b92fe0080882a29b706321aebd16 /modules/lightmapper_rd
parenta7599076d2e588d9877fa7cec6b8fe889bf12904 (diff)
GPULightmapper: execute dilate also after denoise
Dilate fills gaps that are caused by the rasterization. As dilate is based on the alpha-channel which is not part of denoise, dilate can be run after denoise as well. So that colors are not denoised/mixed over seams.
Diffstat (limited to 'modules/lightmapper_rd')
-rw-r--r--modules/lightmapper_rd/lightmapper_rd.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/modules/lightmapper_rd/lightmapper_rd.cpp b/modules/lightmapper_rd/lightmapper_rd.cpp
index 61e68127e4..37e969db4d 100644
--- a/modules/lightmapper_rd/lightmapper_rd.cpp
+++ b/modules/lightmapper_rd/lightmapper_rd.cpp
@@ -1466,6 +1466,14 @@ LightmapperRD::BakeError LightmapperRD::bake(BakeQuality p_quality, bool p_use_d
}
}
}
+
+ {
+ 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;
+ }
+ }
}
#ifdef DEBUG_TEXTURES