mirror of
https://github.com/luanti-org/luanti.git
synced 2025-08-01 17:38:41 +00:00
Add smooth light-shadow transition at noon (#11430)
Node faces with normals pointing East/West (+X/-X) will transition between light and shadow at noon. This code makes the transition smooth.
This commit is contained in:
parent
5d27cc5096
commit
ff2d2a6e93
1 changed files with 2 additions and 2 deletions
|
@ -498,8 +498,8 @@ void main(void)
|
|||
|
||||
}
|
||||
|
||||
if (f_normal_length != 0 && cosLight < 0.0) {
|
||||
shadow_int = clamp(1.0-nightRatio, 0.0, 1.0);
|
||||
if (f_normal_length != 0 && cosLight < 0.035) {
|
||||
shadow_int = max(shadow_int, min(clamp(1.0-nightRatio, 0.0, 1.0), 1 - clamp(cosLight, 0.0, 0.035)/0.035));
|
||||
}
|
||||
|
||||
shadow_int = 1.0 - (shadow_int * f_adj_shadow_strength);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue