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:
authorCharlie Jolly <charlie>2021-12-14 00:20:07 +0300
committerCharlie Jolly <mistajolly@gmail.com>2021-12-14 21:27:01 +0300
commit5b61737a8f41688699fd1d711a25b7cea86d1530 (patch)
treefcea899c2663e666a6b2e9f15b31dfe2064c7a42 /intern/cycles/scene/shader_nodes.h
parent44232a2ce6d8762f10366f6bb660a37ce3e1acbd (diff)
Nodes: Add vector support to Map Range node
This replaces lost functionality from the old GN Attribute Map Range node. This also adds vector support to the shader version of the node. Notes: This breaks forward compatibility as this node now uses data storage. Reviewed By: HooglyBoogly, brecht Differential Revision: https://developer.blender.org/D12760
Diffstat (limited to 'intern/cycles/scene/shader_nodes.h')
-rw-r--r--intern/cycles/scene/shader_nodes.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/intern/cycles/scene/shader_nodes.h b/intern/cycles/scene/shader_nodes.h
index 64a2b1c7843..0faefd3041f 100644
--- a/intern/cycles/scene/shader_nodes.h
+++ b/intern/cycles/scene/shader_nodes.h
@@ -1263,6 +1263,21 @@ class BlackbodyNode : public ShaderNode {
NODE_SOCKET_API(float, temperature)
};
+class VectorMapRangeNode : public ShaderNode {
+ public:
+ SHADER_NODE_CLASS(VectorMapRangeNode)
+ void expand(ShaderGraph *graph);
+
+ NODE_SOCKET_API(float3, vector)
+ NODE_SOCKET_API(float3, from_min)
+ NODE_SOCKET_API(float3, from_max)
+ NODE_SOCKET_API(float3, to_min)
+ NODE_SOCKET_API(float3, to_max)
+ NODE_SOCKET_API(float3, steps)
+ NODE_SOCKET_API(NodeMapRangeType, range_type)
+ NODE_SOCKET_API(bool, use_clamp)
+};
+
class MapRangeNode : public ShaderNode {
public:
SHADER_NODE_CLASS(MapRangeNode)