Merge pull request #82533 from DarioSamo/no-dilate-before-denoise

Make the lightmapper not dilate before denoising.
This commit is contained in:
Rémi Verschelde 2023-09-29 19:47:29 +02:00
commit dd3dda797c
No known key found for this signature in database
GPG Key ID: C3336907360768E1
1 changed files with 6 additions and 14 deletions

View File

@ -1493,14 +1493,6 @@ LightmapperRD::BakeError LightmapperRD::bake(BakeQuality p_quality, bool p_use_d
} }
#endif #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 */ /* DENOISE */
if (p_use_denoiser) { if (p_use_denoiser) {
@ -1515,13 +1507,13 @@ LightmapperRD::BakeError LightmapperRD::bake(BakeQuality p_quality, bool p_use_d
return error; return error;
} }
} }
}
{ {
SWAP(light_accum_tex, light_accum_tex2); 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)); 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)) { if (unlikely(error != BAKE_OK)) {
return error; return error;
}
} }
} }