From d6e4b4599435ea816bd15370f9fae129af5675a2 Mon Sep 17 00:00:00 2001 From: Juan Linietsky Date: Fri, 1 Nov 2019 22:08:56 -0300 Subject: More correctly divide alpha by 8 for mipmaps, fixes voxel overocclusion. --- servers/visual/rasterizer_rd/shaders/giprobe.glsl | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'servers/visual/rasterizer_rd/shaders') 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 -- cgit v1.2.3