change curve evaluation functions never to modify curve data (ensures thread safety...
[blender-staging.git] / source / blender / gpu / intern / gpu_material.c
index bd25a042ee41d4a0c7d910b166a2dffadbda28a2..efb243757297eb2a55db77ce4a2e8e829327ea88 100644 (file)
@@ -427,6 +427,7 @@ static GPUNodeLink *lamp_get_visibility(GPUMaterial *mat, GPULamp *lamp, GPUNode
                                        float *array;
                                        int size;
 
+                                       curvemapping_initialize(lamp->curfalloff);
                                        curvemapping_table_RGBA(lamp->curfalloff, &array, &size);
                                        GPU_link(mat, "lamp_falloff_curve", GPU_dynamic_uniform(&lamp->dist, GPU_DYNAMIC_LAMP_DISTANCE, lamp->ob), GPU_texture(size, array), *dist, &visifac);
                                }