diff options
Diffstat (limited to 'intern/cycles/kernel/shaders/node_rgb_ramp.osl')
-rw-r--r-- | intern/cycles/kernel/shaders/node_rgb_ramp.osl | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/intern/cycles/kernel/shaders/node_rgb_ramp.osl b/intern/cycles/kernel/shaders/node_rgb_ramp.osl index bac4b9552e0..2e0784c8ecf 100644 --- a/intern/cycles/kernel/shaders/node_rgb_ramp.osl +++ b/intern/cycles/kernel/shaders/node_rgb_ramp.osl @@ -22,6 +22,7 @@ shader node_rgb_ramp( color ramp_color[RAMP_TABLE_SIZE] = {0.0}, float ramp_alpha[RAMP_TABLE_SIZE] = {0.0}, + int ramp_interpolate = 1, float Fac = 0.0, output color Color = 0.0, @@ -38,7 +39,7 @@ shader node_rgb_ramp( Color = ramp_color[i]; Alpha = ramp_alpha[i]; - if (t > 0.0) { + if (ramp_interpolate && t > 0.0) { Color = (1.0 - t) * Color + t * ramp_color[i + 1]; Alpha = (1.0 - t) * Alpha + t * ramp_alpha[i + 1]; } |