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
path: root/intern
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2012-10-19 07:07:58 +0400
committerCampbell Barton <ideasman42@gmail.com>2012-10-19 07:07:58 +0400
commit9b07c98bb40ac93774b7cfc9723bd28c95ec409d (patch)
tree90ad7172ac43826ceecea77bffdbfe4e2343454b /intern
parent5ad61e9642a8f0d26c7e5c85477747f4f387bfc3 (diff)
code cleanup: minor style change & quiet warning, also add assert for BM_vert_splice() to check for invalid use.
Diffstat (limited to 'intern')
-rw-r--r--intern/cycles/kernel/osl/nodes/node_rgb_ramp.osl29
1 files changed, 14 insertions, 15 deletions
diff --git a/intern/cycles/kernel/osl/nodes/node_rgb_ramp.osl b/intern/cycles/kernel/osl/nodes/node_rgb_ramp.osl
index afce1127305..a128ebbd1cf 100644
--- a/intern/cycles/kernel/osl/nodes/node_rgb_ramp.osl
+++ b/intern/cycles/kernel/osl/nodes/node_rgb_ramp.osl
@@ -20,25 +20,24 @@
#include "oslutil.h"
shader node_rgb_ramp(
- color ramp_color[RAMP_TABLE_SIZE] = {0.0},
- float ramp_alpha[RAMP_TABLE_SIZE] = {0.0},
+ color ramp_color[RAMP_TABLE_SIZE] = {0.0},
+ float ramp_alpha[RAMP_TABLE_SIZE] = {0.0},
- float Fac = 0.0,
- output color Color = color(0.0, 0.0, 0.0),
- output float Alpha = 1.0
- )
+ float Fac = 0.0,
+ output color Color = color(0.0, 0.0, 0.0),
+ output float Alpha = 1.0)
{
- float f = clamp(Fac, 0.0, 1.0) * (RAMP_TABLE_SIZE - 1);
+ float f = clamp(Fac, 0.0, 1.0) * (RAMP_TABLE_SIZE - 1);
- int i = (int)f;
- float t = f - (float)i;
+ int i = (int)f;
+ float t = f - (float)i;
- Color = ramp_color[i];
- Alpha = ramp_alpha[i];
+ Color = ramp_color[i];
+ Alpha = ramp_alpha[i];
- if (t > 0.0) {
- Color = (1.0 - t) * Color + t * ramp_color[i + 1];
- Alpha = (1.0 - t) * Alpha + t * ramp_alpha[i + 1];
- }
+ if (t > 0.0) {
+ Color = (1.0 - t) * Color + t * ramp_color[i + 1];
+ Alpha = (1.0 - t) * Alpha + t * ramp_alpha[i + 1];
+ }
}