summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJuan Linietsky <reduzio@gmail.com>2018-11-23 08:42:35 -0300
committerJuan Linietsky <reduzio@gmail.com>2018-11-23 08:42:35 -0300
commita397d3a46ae12a997ffd52dade774d1063cca13f (patch)
tree424dd003bd5d01d1407c1a6458cc62775cd5f885
parent8ba0d513fa0068a241a25fbb6db09315fa3309cc (diff)
Avoid voxel cone trace from going full 180 degrees, fixes #20716
-rw-r--r--drivers/gles3/shaders/scene.glsl2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gles3/shaders/scene.glsl b/drivers/gles3/shaders/scene.glsl
index 45802ad3b5..e2e3584304 100644
--- a/drivers/gles3/shaders/scene.glsl
+++ b/drivers/gles3/shaders/scene.glsl
@@ -1504,7 +1504,7 @@ void gi_probe_compute(mediump sampler3D probe, mat4 probe_xform, vec3 bounds, ve
//irradiance
- vec3 irr_light = voxel_cone_trace(probe, cell_size, probe_pos, environment, blend_ambient, ref_vec, max(min_ref_tan, tan(roughness * 0.5 * M_PI)), max_distance, p_bias);
+ vec3 irr_light = voxel_cone_trace(probe, cell_size, probe_pos, environment, blend_ambient, ref_vec, max(min_ref_tan, tan(roughness * 0.5 * M_PI * 0.99)), max_distance, p_bias);
irr_light *= multiplier;
//irr_light=vec3(0.0);