forked from bartvdbraak/blender
Fix [#36822], Sky Turbidity values > 10 could result in weird behavior and crashes with the new sky model.
Soft UI range is 10 already, now clamp inside the code as well.
This commit is contained in:
parent
bb43e8a8a6
commit
d0a092be5c
@ -520,6 +520,9 @@ static void sky_texture_precompute_new(SunSky *sunsky, float3 dir, float turbidi
|
||||
float theta = spherical.x;
|
||||
float phi = spherical.y;
|
||||
|
||||
/* Clamp Turbidity */
|
||||
turbidity = clamp(turbidity, 0.0f, 10.0f);
|
||||
|
||||
/* Clamp to Horizon */
|
||||
theta = clamp(theta, 0.0f, M_PI_2_F);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user