summaryrefslogtreecommitdiff
path: root/servers/visual/rasterizer_rd/shaders
diff options
context:
space:
mode:
authorJuan Linietsky <reduzio@gmail.com>2019-11-01 22:08:56 -0300
committerJuan Linietsky <reduzio@gmail.com>2020-02-11 12:05:04 +0100
commitd6e4b4599435ea816bd15370f9fae129af5675a2 (patch)
treebf7afc2cc103a2331cb957813ef11c804489d3b1 /servers/visual/rasterizer_rd/shaders
parentf4c5e88ef2d5eef16bbaf11180bb2d251f6fcf49 (diff)
More correctly divide alpha by 8 for mipmaps, fixes voxel overocclusion.
Diffstat (limited to 'servers/visual/rasterizer_rd/shaders')
-rw-r--r--servers/visual/rasterizer_rd/shaders/giprobe.glsl6
1 files changed, 3 insertions, 3 deletions
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