diff options
| author | William Deurwaarder <william.git@xs4all.nl> | 2021-09-26 09:16:31 +0200 |
|---|---|---|
| committer | William Deurwaarder <william.git@xs4all.nl> | 2021-10-16 11:28:37 +0200 |
| commit | a7599076d2e588d9877fa7cec6b8fe889bf12904 (patch) | |
| tree | 648147c60a00aa6cdbdec182b2dd032ac1a8b2cb /modules/lightmapper_rd/lightmapper_rd.h | |
| parent | 90a1e5193366e57069951cf2703616248e5f515d (diff) | |
| download | redot-engine-a7599076d2e588d9877fa7cec6b8fe889bf12904.tar.gz | |
GPULightmapper: execute dilate before denoise
Dilate fills gaps that are caused by the rasterization. Previously denoise
was done before dilate which caused the gaps to become filled (non-zero). This
resulted that the gaps were not recognized by
dilate and the background color leaked.
This is fixed by executing dilate before denoise.
Diffstat (limited to 'modules/lightmapper_rd/lightmapper_rd.h')
| -rw-r--r-- | modules/lightmapper_rd/lightmapper_rd.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/modules/lightmapper_rd/lightmapper_rd.h b/modules/lightmapper_rd/lightmapper_rd.h index a6a3740051..e1657b2069 100644 --- a/modules/lightmapper_rd/lightmapper_rd.h +++ b/modules/lightmapper_rd/lightmapper_rd.h @@ -36,6 +36,7 @@ #include "scene/resources/mesh.h" #include "servers/rendering/rendering_device.h" +class RDShaderFile; class LightmapperRD : public Lightmapper { GDCLASS(LightmapperRD, Lightmapper) @@ -231,6 +232,8 @@ class LightmapperRD : public Lightmapper { void _create_acceleration_structures(RenderingDevice *rd, Size2i atlas_size, int atlas_slices, AABB &bounds, int grid_size, Vector<Probe> &probe_positions, GenerateProbes p_generate_probes, Vector<int> &slice_triangle_count, Vector<int> &slice_seam_count, RID &vertex_buffer, RID &triangle_buffer, RID &lights_buffer, RID &triangle_cell_indices_buffer, RID &probe_positions_buffer, RID &grid_texture, RID &seams_buffer, BakeStepFunc p_step_function, void *p_bake_userdata); void _raster_geometry(RenderingDevice *rd, Size2i atlas_size, int atlas_slices, int grid_size, AABB bounds, float p_bias, Vector<int> slice_triangle_count, RID position_tex, RID unocclude_tex, RID normal_tex, RID raster_depth_buffer, RID rasterize_shader, RID raster_base_uniform); + BakeError _dilate(RenderingDevice *rd, Ref<RDShaderFile> &compute_shader, RID &compute_base_uniform_set, PushConstant &push_constant, RID &source_light_tex, RID &dest_light_tex, const Size2i &atlas_size, int atlas_slices); + public: virtual void add_mesh(const MeshData &p_mesh) override; virtual void add_directional_light(bool p_static, const Vector3 &p_direction, const Color &p_color, float p_energy, float p_angular_distance) override; |
