Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Dinges <blender@dingto.org>2013-03-27 23:44:25 +0400
committerThomas Dinges <blender@dingto.org>2013-03-27 23:44:25 +0400
commit535253cad0cbf27485d6390039fab6e339a441a4 (patch)
tree0bd0a436b6f130eca82bb8fdd0f2efa1d9f8f249
parentc766b0792a114e1a488efee0b944190255beb05e (diff)
Cycles / SunSky:
* Use already calculated theta^2 for theta^3 calculation.
-rw-r--r--intern/cycles/kernel/shaders/node_sky_texture.osl2
-rw-r--r--intern/cycles/render/nodes.cpp2
2 files changed, 2 insertions, 2 deletions
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;