diff options
author | Juan Linietsky <reduzio@gmail.com> | 2017-12-07 16:19:35 -0300 |
---|---|---|
committer | Juan Linietsky <reduzio@gmail.com> | 2017-12-07 16:19:35 -0300 |
commit | 8717afbfe14357fc1e3c192676f89a91bd28329b (patch) | |
tree | e1a0e3c74fcae79f14f05b3e082940354f52bd48 /drivers/gles3 | |
parent | 209cb3830c605edef494d45253b89bd76b3bbbc3 (diff) |
Added small bit of bias depending on lenght for contact shadows, fixes #12726
Diffstat (limited to 'drivers/gles3')
-rw-r--r-- | drivers/gles3/shaders/scene.glsl | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gles3/shaders/scene.glsl b/drivers/gles3/shaders/scene.glsl index 676541649c..b70d59652d 100644 --- a/drivers/gles3/shaders/scene.glsl +++ b/drivers/gles3/shaders/scene.glsl @@ -827,7 +827,7 @@ float contact_shadow_compute(vec3 pos, vec3 dir, float max_distance) { pixel_size = abs((pos.y-endpoint.y)/(screen_rel.y/screen_pixel_size.y)); }*/ - vec4 bias = projection_matrix * vec4(pos+vec3(0.0,0.0,0.04), 1.0); //todo un-harcode the 0.04 + vec4 bias = projection_matrix * vec4(pos+vec3(0.0,0.0,max_distance*0.5), 1.0); //todo un-harcode the 0.04 |