diff options
author | Campbell Barton <ideasman42@gmail.com> | 2013-06-22 14:59:30 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2013-06-22 14:59:30 +0400 |
commit | dfbbac9b94bf01b56b47f6b18c634f1b5121328f (patch) | |
tree | 3afdfeb6e2b74dca4a1b93a5c7cf4fb558851d35 /intern/cycles/kernel/shaders | |
parent | 5d28a6bb584186940eb34d0d902cd3556c3757fa (diff) |
style cleanup
Diffstat (limited to 'intern/cycles/kernel/shaders')
-rw-r--r-- | intern/cycles/kernel/shaders/node_bump.osl | 2 | ||||
-rw-r--r-- | intern/cycles/kernel/shaders/node_color.h | 4 | ||||
-rw-r--r-- | intern/cycles/kernel/shaders/node_texture.h | 6 |
3 files changed, 6 insertions, 6 deletions
diff --git a/intern/cycles/kernel/shaders/node_bump.osl b/intern/cycles/kernel/shaders/node_bump.osl index 6d0ec51a9da..321306b6c71 100644 --- a/intern/cycles/kernel/shaders/node_bump.osl +++ b/intern/cycles/kernel/shaders/node_bump.osl @@ -52,6 +52,6 @@ surface node_bump( /* compute and output perturbed normal */ NormalOut = normalize(absdet * NormalIn - dist * sign(det) * surfgrad); - NormalOut = normalize(strength*NormalOut + (1.0 - strength)*NormalIn); + NormalOut = normalize(strength * NormalOut + (1.0 - strength) * NormalIn); } diff --git a/intern/cycles/kernel/shaders/node_color.h b/intern/cycles/kernel/shaders/node_color.h index 92bd39b5828..7fdef65f7f0 100644 --- a/intern/cycles/kernel/shaders/node_color.h +++ b/intern/cycles/kernel/shaders/node_color.h @@ -50,8 +50,8 @@ color color_scene_linear_to_srgb(color c) color color_unpremultiply(color c, float alpha) { - if(alpha != 1.0 && alpha != 0.0) - return c/alpha; + if (alpha != 1.0 && alpha != 0.0) + return c / alpha; return c; } diff --git a/intern/cycles/kernel/shaders/node_texture.h b/intern/cycles/kernel/shaders/node_texture.h index 0a73c0907d9..645be23c6a5 100644 --- a/intern/cycles/kernel/shaders/node_texture.h +++ b/intern/cycles/kernel/shaders/node_texture.h @@ -162,7 +162,7 @@ float safe_noise(point p, int type) f = noise(p); /* can happen for big coordinates, things even out to 0.5 then anyway */ - if(!isfinite(f)) + if (!isfinite(f)) return 0.5; return f; @@ -254,12 +254,12 @@ float noise_turbulence(point p, string basis, float details, int hard) if (hard) t = fabs(2.0 * t - 1.0); - float sum2 = sum + t*amp; + float sum2 = sum + t * amp; sum *= ((float)(1 << n) / (float)((1 << (n + 1)) - 1)); sum2 *= ((float)(1 << (n + 1)) / (float)((1 << (n + 2)) - 1)); - return (1.0 - rmd)*sum + rmd*sum2; + return (1.0 - rmd) * sum + rmd * sum2; } else { sum *= ((float)(1 << n) / (float)((1 << (n + 1)) - 1)); |