From 2b896fc48165be96855bd6d8067ae46c32d049a3 Mon Sep 17 00:00:00 2001 From: Brecht Van Lommel Date: Mon, 17 Aug 2020 17:48:53 +0200 Subject: Fix T79052: Cycles new sky texture fails with sun size zero Clamp to a minimum angle to avoid precision issues. --- intern/cycles/render/light.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'intern/cycles/render/light.cpp') diff --git a/intern/cycles/render/light.cpp b/intern/cycles/render/light.cpp index 183c02cb6b9..567a53afc98 100644 --- a/intern/cycles/render/light.cpp +++ b/intern/cycles/render/light.cpp @@ -634,7 +634,7 @@ void LightManager::device_update_background(Device *device, sun_direction = transform_direction(&sky_transform, sun_direction); /* Pack sun direction and size. */ - float half_angle = sky->sun_size * 0.5f; + float half_angle = sky->get_sun_size() * 0.5f; kbackground->sun = make_float4( sun_direction.x, sun_direction.y, sun_direction.z, half_angle); -- cgit v1.2.3