Jump to content

Shading based on another object?


Recommended Posts

I don't do a lot with shaders, so I am not really sure what is possible and what is not, but I am attempting to sample details of one object from a shader applied to another.  For instance, I place a curve on top of a grid, then have the shader sample the shortest distance to the curve to drive the shader.

Is this possible?  Or do I 100% have to use an obscenely dense geometry to sample it into an attribute so a shader can use it?  I technically don't mind, but I was really hoping I could avoid that step and just have the shader do the work.

I have tried using a nearpoint VOP in the shader, both with op:/obj/mySOP, exporting the points to disk and then targeting the file, as well as the same methods for using a point cloud.  

I know exactly how to do this with attributes on the mesh, it would just be cleaner to be able to do it as a shader.

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...