瀏覽代碼

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.
William Deurwaarder 3 年之前
父節點
當前提交
5465ef83cb
共有 1 個文件被更改,包括 8 次插入0 次删除
  1. 8 0
      modules/lightmapper_rd/lightmapper_rd.cpp

+ 8 - 0
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
 #ifdef DEBUG_TEXTURES