From 535253cad0cbf27485d6390039fab6e339a441a4 Mon Sep 17 00:00:00 2001 From: Thomas Dinges Date: Wed, 27 Mar 2013 19:44:25 +0000 Subject: Cycles / SunSky: * Use already calculated theta^2 for theta^3 calculation. --- intern/cycles/kernel/shaders/node_sky_texture.osl | 2 +- intern/cycles/render/nodes.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'intern') diff --git a/intern/cycles/kernel/shaders/node_sky_texture.osl b/intern/cycles/kernel/shaders/node_sky_texture.osl index 13f958d65bd..e9f7dfb3a2a 100644 --- a/intern/cycles/kernel/shaders/node_sky_texture.osl +++ b/intern/cycles/kernel/shaders/node_sky_texture.osl @@ -107,7 +107,7 @@ void precompute_sunsky(vector dir, float turbidity, output KernelSunSky sunsky) sunsky.dir = dir; float theta2 = theta * theta; - float theta3 = theta * theta * theta; + float theta3 = theta2 * theta; float T = turbidity; float T2 = T * T; diff --git a/intern/cycles/render/nodes.cpp b/intern/cycles/render/nodes.cpp index 398b9f0a758..a4ffc2518fb 100644 --- a/intern/cycles/render/nodes.cpp +++ b/intern/cycles/render/nodes.cpp @@ -393,7 +393,7 @@ static void sky_texture_precompute(KernelSunSky *ksunsky, float3 dir, float turb ksunsky->phi = phi; float theta2 = theta*theta; - float theta3 = theta*theta*theta; + float theta3 = theta2*theta; float T = turbidity; float T2 = T * T; -- cgit v1.2.3