Isotropix Forums

Texture Lookup in OSL Shader

Clarisse Scripting related topics

Texture Lookup in OSL Shader

Unread postby briansilva » Thu Oct 01, 2020 4:08 pm

Hello! When using OSL shaders, it's awesome that Clarisse creates parameters that can accept texture connections. That's working great for pulling a texture colour value at the current UV coordinate (or the other projections available in Projection mode).

However, I have a shader that's doing some complex calculations to determine the (u,v) coordinate to sample on a texture. Currently I just pass the texture file to the OSL shader, and it samples it. That's working great. But, I would love to be able to specify the UV of the connected texture input to determine the value of that colour coming into the shader. This would allow me to feed in something being live-rendered in Clarisse, which would be very useful.

Is there a way to do this with OSL in Clarisse? If I were to output the UVs from my shader, I still don't see a UV input on any of the map nodes, so I'm not sure how to drive a map lookup other than within OSL itself.

Any suggestions on how I might set this up?

Thank you!
Posts: 70
Joined: Mon Mar 25, 2019 12:43 pm

Return to Scripting