summaryrefslogtreecommitdiff
path: root/servers/visual
diff options
context:
space:
mode:
Diffstat (limited to 'servers/visual')
-rw-r--r--servers/visual/rasterizer_rd/rasterizer_scene_rd.cpp4
-rw-r--r--servers/visual/rasterizer_rd/rasterizer_scene_rd.h2
-rw-r--r--servers/visual/rasterizer_rd/shaders/giprobe.glsl6
3 files changed, 6 insertions, 6 deletions
diff --git a/servers/visual/rasterizer_rd/rasterizer_scene_rd.cpp b/servers/visual/rasterizer_rd/rasterizer_scene_rd.cpp
index 05624e5279..2f843b92fc 100644
--- a/servers/visual/rasterizer_rd/rasterizer_scene_rd.cpp
+++ b/servers/visual/rasterizer_rd/rasterizer_scene_rd.cpp
@@ -1948,7 +1948,7 @@ void RasterizerSceneRD::gi_probe_update(RID p_probe, bool p_update_light_instanc
push_constant.prev_rect_ofs[1] = 0;
push_constant.prev_rect_size[0] = 0;
push_constant.prev_rect_size[1] = 0;
- push_constant.keep_downsample_color = true;
+ push_constant.on_mipmap = false;
//process lighting
RD::ComputeListID compute_list = RD::get_singleton()->compute_list_begin();
@@ -2005,7 +2005,7 @@ void RasterizerSceneRD::gi_probe_update(RID p_probe, bool p_update_light_instanc
push_constant.prev_rect_size[1] = push_constant.rect_size[1];
push_constant.rect_size[0] = rect.size[0];
push_constant.rect_size[1] = rect.size[1];
- push_constant.keep_downsample_color = gi_probe->dynamic_maps[k].mipmap <= 0;
+ push_constant.on_mipmap = gi_probe->dynamic_maps[k].mipmap > 0;
RD::get_singleton()->compute_list_add_barrier(compute_list);
diff --git a/servers/visual/rasterizer_rd/rasterizer_scene_rd.h b/servers/visual/rasterizer_rd/rasterizer_scene_rd.h
index d94ee60a2a..59db75eb85 100644
--- a/servers/visual/rasterizer_rd/rasterizer_scene_rd.h
+++ b/servers/visual/rasterizer_rd/rasterizer_scene_rd.h
@@ -173,7 +173,7 @@ private:
uint32_t flip_x;
uint32_t flip_y;
float dynamic_range;
- uint32_t keep_downsample_color;
+ uint32_t on_mipmap;
};
struct GIProbeInstance {
diff --git a/servers/visual/rasterizer_rd/shaders/giprobe.glsl b/servers/visual/rasterizer_rd/shaders/giprobe.glsl
index 0bec71b3df..774819c8c4 100644
--- a/servers/visual/rasterizer_rd/shaders/giprobe.glsl
+++ b/servers/visual/rasterizer_rd/shaders/giprobe.glsl
@@ -134,7 +134,7 @@ layout (r16ui,set=0,binding=7) uniform restrict writeonly uimage3D aniso_neg_tex
layout(push_constant, binding = 0, std430) uniform Params {
ivec3 limits;
- uint light_count;
+ uint light_count; //when not lighting
ivec3 x_dir;
float z_base;
ivec3 y_dir;
@@ -148,7 +148,7 @@ layout(push_constant, binding = 0, std430) uniform Params {
bool flip_x;
bool flip_y;
float dynamic_range;
- bool keep_downsample_color;
+ bool on_mipmap;
} params;
@@ -753,7 +753,7 @@ void main() {
}
- accum/=4.0;
+ accum/=params.on_mipmap ? 8.0 : 4.0;
if (count==0.0) {
accum_z=0.0; //avoid nan