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:
authorHallam Roberts <MysteryPancake>2022-03-21 19:33:24 +0300
committerBrecht Van Lommel <brecht@blender.org>2022-03-21 19:41:17 +0300
commitc7e25a25b06659ed41e9f4ee101a0980135cdb24 (patch)
tree87b6e263b9384f84011da79070f420d8a8da2afd /intern/cycles/kernel/osl/shaders/node_float_curve.osl
parentf92e3b39f18a3d3e29873faed98f6279571fbc4f (diff)
Fix T96132: Cycles RGB/Vector/Float Curve shaders ignore extrapolation setting
Differential Revision: https://developer.blender.org/D14393
Diffstat (limited to 'intern/cycles/kernel/osl/shaders/node_float_curve.osl')
-rw-r--r--intern/cycles/kernel/osl/shaders/node_float_curve.osl4
1 files changed, 3 insertions, 1 deletions
diff --git a/intern/cycles/kernel/osl/shaders/node_float_curve.osl b/intern/cycles/kernel/osl/shaders/node_float_curve.osl
index 265a21bd4aa..70de1217877 100644
--- a/intern/cycles/kernel/osl/shaders/node_float_curve.osl
+++ b/intern/cycles/kernel/osl/shaders/node_float_curve.osl
@@ -7,13 +7,15 @@
shader node_float_curve(float ramp[] = {0.0},
float min_x = 0.0,
float max_x = 1.0,
+ int extrapolate = 1,
+
float ValueIn = 0.0,
float Factor = 0.0,
output float ValueOut = 0.0)
{
float c = (ValueIn - min_x) / (max_x - min_x);
- ValueOut = rgb_ramp_lookup(ramp, c, 1, 1);
+ ValueOut = rgb_ramp_lookup(ramp, c, 1, extrapolate);
ValueOut = mix(ValueIn, ValueOut, Factor);
}