Lens Shader Clipping Planes

   1513   2   0
User Avatar
Member
9 posts
Joined: May 2013
Offline
Hello Wizards!

I have a quick question for all VEX samurais over there regarding as the title implies the clipping planes of a lens shader.
So far I understand and am able to manipulate the P and I (direction) of where the rays are shooting, and I have tried to find a way to modify the far and near clippling planes of my render but so far no success.

So, my concrete question is: what is the CVEX declaration of the near and far clip plane in a lens shader?

I mean it should be something in the lines of:

export vector P = 0; //Ray origin in Camera space
export vector I = 0; //Ray direction in Camera Space
export int valid = 1; //Whether the sample is valid for measuring

//tried this as referenced here: https://www.sidefx.com/docs/houdini/vex/functions/orthographic.html but no dice
export float clip_near

I also tried multiplying the direction, in hopes that maybe it will do something. It is an orthographic inwards cylinder btw!

Thanks a lot for reading

Cheers!
Edited by zeekindustries - Aug. 17, 2021 10:20:17
User Avatar
Staff
2638 posts
Joined: July 2005
Offline
Is this for mantra or for karma? For karma, you want an export vector2 clippingrange = {0,1}(see physicallens.vfl)
User Avatar
Member
9 posts
Joined: May 2013
Offline
Hey Mark!
Sorry for not specifying that, it is for Mantra!
Now that you mention, I may start looking into porting my lens shader into Karma if the time allows.
  • Quick Links