diff options
author | Charlie Jolly <charlie> | 2021-05-24 14:02:45 +0300 |
---|---|---|
committer | Charlie Jolly <mistajolly@gmail.com> | 2021-05-24 14:02:49 +0300 |
commit | 6c2c16b5f87e30a338d3f2e7259887403d736f50 (patch) | |
tree | c50646608ca21a1e687a75898bcab22c945734e0 | |
parent | 24004e74fa442a1b817180e62aefe5d4d526f406 (diff) |
Nodes: move shader curves node to C++
Prepare node for conversion to Geometry Nodes.
There should be no functional changes.
Reviewed By: JacquesLucke, LazyDodo
Differential Revision: https://developer.blender.org/D11226
-rw-r--r-- | source/blender/nodes/CMakeLists.txt | 2 | ||||
-rw-r--r-- | source/blender/nodes/shader/nodes/node_shader_curves.cc (renamed from source/blender/nodes/shader/nodes/node_shader_curves.c) | 8 |
2 files changed, 5 insertions, 5 deletions
diff --git a/source/blender/nodes/CMakeLists.txt b/source/blender/nodes/CMakeLists.txt index 33b56fd0de0..9d21ff19f46 100644 --- a/source/blender/nodes/CMakeLists.txt +++ b/source/blender/nodes/CMakeLists.txt @@ -219,7 +219,7 @@ set(SRC shader/nodes/node_shader_camera.c shader/nodes/node_shader_clamp.cc shader/nodes/node_shader_common.c - shader/nodes/node_shader_curves.c + shader/nodes/node_shader_curves.cc shader/nodes/node_shader_displacement.c shader/nodes/node_shader_eevee_specular.c shader/nodes/node_shader_emission.c diff --git a/source/blender/nodes/shader/nodes/node_shader_curves.c b/source/blender/nodes/shader/nodes/node_shader_curves.cc index 42299a193e2..ff619306682 100644 --- a/source/blender/nodes/shader/nodes/node_shader_curves.c +++ b/source/blender/nodes/shader/nodes/node_shader_curves.cc @@ -47,7 +47,7 @@ static void node_shader_exec_curve_vec(void *UNUSED(data), /* stack order input: vec */ /* stack order output: vec */ nodestack_get_vec(vec, SOCK_VECTOR, in[1]); - BKE_curvemapping_evaluate3F(node->storage, out[0]->vec, vec); + BKE_curvemapping_evaluate3F((CurveMapping *)node->storage, out[0]->vec, vec); } static void node_shader_init_curve_vec(bNodeTree *UNUSED(ntree), bNode *node) @@ -64,7 +64,7 @@ static int gpu_shader_curve_vec(GPUMaterial *mat, float *array, layer; int size; - CurveMapping *cumap = node->storage; + CurveMapping *cumap = (CurveMapping *)node->storage; BKE_curvemapping_table_RGBA(cumap, &array, &size); GPUNodeLink *tex = GPU_color_band(mat, size, array, &layer); @@ -145,7 +145,7 @@ static void node_shader_exec_curve_rgb(void *UNUSED(data), /* stack order output: vec */ nodestack_get_vec(&fac, SOCK_FLOAT, in[0]); nodestack_get_vec(vec, SOCK_VECTOR, in[1]); - BKE_curvemapping_evaluateRGBF(node->storage, out[0]->vec, vec); + BKE_curvemapping_evaluateRGBF((CurveMapping *)node->storage, out[0]->vec, vec); if (fac != 1.0f) { interp_v3_v3v3(out[0]->vec, vec, out[0]->vec, fac); } @@ -166,7 +166,7 @@ static int gpu_shader_curve_rgb(GPUMaterial *mat, int size; bool use_opti = true; - CurveMapping *cumap = node->storage; + CurveMapping *cumap = (CurveMapping *)node->storage; BKE_curvemapping_init(cumap); BKE_curvemapping_table_RGBA(cumap, &array, &size); |