How to write custom panoramic lens shader?

Hi,

I want to render a 360 degree view of scene into an arbitrary shaped camera lens, can you please guide me how to do so, I think it is possible with osl but I’m unable to figure out how to write a custom camera shader.

Hi, are you trying to implement this in Blender? If so there is an old patch for that that you could look into reviving.

Yes, I’m trying to implement in Blender.

See https://developer.blender.org/T35428 for a start point.

I would first try to come up with a design though (which parameters you would take, how users would set this up), to get this approved by the Cycles team before you start coding.

Sure, I’ll wait until you get it approved.

What I meant is, if you want to work on that, I recommend you first put together a design, so that your efforts are not wasted.

Alright, I will get back to you soon with some solution.