Geometry Nodes: Add Attribute Curve Map Node

This node has the same functionality as the color and vector curve
mapping nodes in the shader editor. Here is works on every value for
the selected attribute, and it can also output a float value. Other
than that, the implementation is quite straightforward-- almost
completely boilerplate code.

Differential Revision: https://developer.blender.org/D10921
This commit is contained in:
Charlie Jolly
2021-05-06 23:47:51 -05:00
committed by Hans Goudey
parent 026a9cdc21
commit ba06bc16ae
9 changed files with 291 additions and 0 deletions

View File

@@ -1188,6 +1188,14 @@ typedef struct NodeAttributeColorRamp {
ColorBand color_ramp;
} NodeAttributeColorRamp;
typedef struct NodeAttributeCurveMap {
/* CustomDataType. */
uint8_t data_type;
char _pad[7];
CurveMapping *curve_vec;
CurveMapping *curve_rgb;
} NodeAttributeCurveMap;
typedef struct NodeInputVector {
float vector[3];
} NodeInputVector;