Fix T79052: Cycles new sky texture fails with sun size zero

Clamp to a minimum angle to avoid precision issues.
This commit is contained in:
2020-08-17 17:48:53 +02:00
parent c7a7a38b65
commit 2b896fc481
4 changed files with 11 additions and 5 deletions

View File

@@ -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);