Help with baking system

Hi I’m just getting started with open source in general, extremely new to blender source code. I have been trying to find a way to add a new baking type to cycles engine but I cannot find where the rendering is actually going on. For now I have found BlenderSession->Bake->Device->Task??

Is this even done on the /source or is it a dll thing? Just pointing me in the right direction is enough, I’m having fun reading the code. Thanks

Ok found it, I was able to track it till DeviceCPU::thread_shader

Now, i have hit a dead wall with the kernel, since thread_sadher calls for shader_kernel()(…params…)

Anyone knows how the Cycles Kernel works?

This ends up calling kernel_bake_evaluate() in kernel_bake.h, where the kernel-side baking is done.

Thanks!, yeah I ended up finding it after all. The whole macro setup of the kernel functions did lost me a bit at first. I’ll keep looking around until I can make some contributions.