Jump to content

Custom Lens Shader: What is the length of I?


jonp

Recommended Posts

Greetings,

I've mostly implemented a fisheye lens shader in VEX which traces the rays where I want them, etc...  but I've noticed that the standard surface shader and texture derivatives are scaled by the length of I.

 

So does anyone know what exactly this should be set to?

 

Jon

Edited by jonp
Link to comment
Share on other sites

I asked the wrong question...

 

It was a conditional in the lens shader that confused the derivative calculation... tests that set I to zero at the beginning of the render will set the derivatives incorrectly.  I think this may be fixed in a newer build (14.0.258).

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...