Access external data in cycles

Hello everyone
I’m trying to use some empirical data (matrix/csv) in cycles.
To be more precise I’m using them in kernel_camera.h to modify sampling behaviour.
at first I thought I might just create the matrix directly in the code but it give this error:

cycles_kernel_osl.lib(osl_services.obj) : error LNK2005: "float (* ccl::matrConv)[11]" (?matrConv@ccl@@3PAY0L@MA) already defined in cycles_kernel.lib(kernel.obj) [C:\blender-git\build_windows_x64_vc16_Release\source\creator\blender.vcxproj]

I don’t really know how to access those data easily in blender and I need some advice/guide/info to do so.
thank you!

I guess matrConv is a function that you added in a header, but did not mark as inline? Or you implemented it twice?

this is the implementation
image

try putting a ccl_static_constant on those two arrays.

1 Like

It worked, thank you all!