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:
Diffstat (limited to 'intern/cycles/kernel/shaders/node_clamp.osl')
-rw-r--r--intern/cycles/kernel/shaders/node_clamp.osl5
1 files changed, 3 insertions, 2 deletions
diff --git a/intern/cycles/kernel/shaders/node_clamp.osl b/intern/cycles/kernel/shaders/node_clamp.osl
index ce9392a0d98..b600fb7c455 100644
--- a/intern/cycles/kernel/shaders/node_clamp.osl
+++ b/intern/cycles/kernel/shaders/node_clamp.osl
@@ -16,11 +16,12 @@
#include "stdcycles.h"
-shader node_clamp(string type = "minmax",
+shader node_clamp(string clamp_type = "minmax",
float Value = 1.0,
float Min = 0.0,
float Max = 1.0,
output float Result = 0.0)
{
- Result = (type == "range" && (Min > Max)) ? clamp(Value, Max, Min) : clamp(Value, Min, Max);
+ Result = (clamp_type == "range" && (Min > Max)) ? clamp(Value, Max, Min) :
+ clamp(Value, Min, Max);
}