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:
authorBrecht Van Lommel <brechtvanlommel@pandora.be>2013-09-04 02:39:21 +0400
committerBrecht Van Lommel <brechtvanlommel@pandora.be>2013-09-04 02:39:21 +0400
commit60e5abe71f8c219f7ba6dcb8ac9d109ca5610715 (patch)
tree6a57327818427635e3ac1304e8c1858f9b0621bd /intern/cycles/render/nodes.cpp
parentb314209356288c3768faa1d7fbd7b1bf9d179a7a (diff)
Fix a few issues reported by coverity scan.
Diffstat (limited to 'intern/cycles/render/nodes.cpp')
-rw-r--r--intern/cycles/render/nodes.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/intern/cycles/render/nodes.cpp b/intern/cycles/render/nodes.cpp
index 06acb9e749e..22bca659072 100644
--- a/intern/cycles/render/nodes.cpp
+++ b/intern/cycles/render/nodes.cpp
@@ -452,6 +452,13 @@ static void sky_texture_precompute_old(SunSky *sunsky, float3 dir, float turbidi
sunsky->config_z[3] = (-0.0441f * T - 1.6537f);
sunsky->config_z[4] = (-0.0109f * T + 0.0529f);
+ /* unused for old sky model */
+ for(int i = 5; i < 9; i++) {
+ sunsky->config_x[i] = 0.0f;
+ sunsky->config_y[i] = 0.0f;
+ sunsky->config_z[i] = 0.0f;
+ }
+
sunsky->radiance_x /= sky_perez_function(sunsky->config_x, 0, theta);
sunsky->radiance_y /= sky_perez_function(sunsky->config_y, 0, theta);
sunsky->radiance_z /= sky_perez_function(sunsky->config_z, 0, theta);
@@ -558,6 +565,7 @@ void SkyTextureNode::compile(OSLCompiler& compiler)
tex_mapping.compile(compiler);
SunSky sunsky;
+
if(type_enum[type] == NODE_SKY_OLD)
sky_texture_precompute_old(&sunsky, sun_direction, turbidity);
else if(type_enum[type] == NODE_SKY_NEW)