diff options
author | Thomas Dinges <blender@dingto.org> | 2013-09-27 14:26:00 +0400 |
---|---|---|
committer | Thomas Dinges <blender@dingto.org> | 2013-09-27 14:26:00 +0400 |
commit | d0a092be5c8069d4b56a558868eff2912a714307 (patch) | |
tree | a6b926e7f8a86667e35423eb361944cf6f7fd387 /intern | |
parent | bb43e8a8a624cf81d5673b46ab29d894b80c5a18 (diff) |
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.
Diffstat (limited to 'intern')
-rw-r--r-- | intern/cycles/render/nodes.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/intern/cycles/render/nodes.cpp b/intern/cycles/render/nodes.cpp index 35b8a151587..621d52bbbbf 100644 --- a/intern/cycles/render/nodes.cpp +++ b/intern/cycles/render/nodes.cpp @@ -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); |