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:
authorCampbell Barton <ideasman42@gmail.com>2012-08-21 18:43:51 +0400
committerCampbell Barton <ideasman42@gmail.com>2012-08-21 18:43:51 +0400
commit8bd7c3fba2749fdf2b16c4f32abf1a35692bc5bb (patch)
treeec5506895139ed6a09921c60eaf61bd8eb7f2226 /source/blender/nodes/shader
parent809fce9d00ecf8eea2c3d2ea52c3de2ec2ede1ee (diff)
change curve evaluation functions never to modify curve data (ensures thread safety), now initializations has to be done outside evaluation.
Diffstat (limited to 'source/blender/nodes/shader')
-rw-r--r--source/blender/nodes/shader/nodes/node_shader_curves.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/source/blender/nodes/shader/nodes/node_shader_curves.c b/source/blender/nodes/shader/nodes/node_shader_curves.c
index be7f3c1c614..512182ebe12 100644
--- a/source/blender/nodes/shader/nodes/node_shader_curves.c
+++ b/source/blender/nodes/shader/nodes/node_shader_curves.c
@@ -65,6 +65,7 @@ static int gpu_shader_curve_vec(GPUMaterial *mat, bNode *node, GPUNodeStack *in,
float *array;
int size;
+ curvemapping_initialize(node->storage);
curvemapping_table_RGBA(node->storage, &array, &size);
return GPU_stack_link(mat, "curves_vec", in, out, GPU_texture(size, array));
}
@@ -120,6 +121,8 @@ static int gpu_shader_curve_rgb(GPUMaterial *mat, bNode *node, GPUNodeStack *in,
{
float *array;
int size;
+
+ curvemapping_initialize(node->storage);
curvemapping_table_RGBA(node->storage, &array, &size);
return GPU_stack_link(mat, "curves_rgb", in, out, GPU_texture(size, array));
}