- Home /
uv array and surface shader?
I'd like to write a custom surface shader to display some colored dots. The uv coords where those dots should be rendered is examined through raycasts.
I have 10 raycast hits on a object. At the position of any hit I want to display a colored dot. Now I get the mesh UV coordinates for each hit. How can I pass them to a shader so I know where to render a different color?
Any thoughts? :)
Edit: more detailed question
I'm confused - shaders already take the UV coordinates of a mesh into account every pass, so they'd already be passed in every frame.
Sorry for being unclear.. i'll try to explain better :)
I like to render some pixels in another color: I have 10 raycast hits on a object. At the position of any hit I want to display a colored dot. Now I get the mesh UV coordinates for each hit. How can I pass them to a shader so I know where to render a different color?
Your answer
Follow this Question
Related Questions
Anyone have shader that supports two UV channels? 1 Answer
Folded UV's results in difference in shading of normals? 0 Answers
Material offset relative to other game object 0 Answers
How to Modify Standard Surface Shader's SpecCube? 1 Answer
How does Unity handle UV maps with all vertices of face stacked? 1 Answer