how do i make the shader graph take the same color as the color below it is touching. I am using this for grass so there will be many meshes with same mat applied
One option would be to set up a camera that’s pointing down and render that camera’s view to a texture. Then sample that texture in your shader. That’s a little bit expensive - to render things from the perspective of two different cameras. A little bit cheaper way would be to just take a top-down screen shot of your scene and save it out as a static texture. Then sample that texture in your shader.
Thank you, but i forgot to mention some things, i am using this for grass so i need to get the screen position of the object andthen color it that way
You can use the XZ components of the Position in world space of the grass objects as texture coordinates to sample from the texture I mentioned above. You would need to use a Remap node to convert the minimum and maximum positions to 0 to 1 for the coordinates.