shader changes based on object position (shader forge)

I was wounder if any one had experience or could shed light on how to make a shader that changes based on an object position?

Example would be I have an object that is in X,Y,Z space and it moves around in the environment controlling a ramp that is used in a shader that is applied to another object.

Like a fake Fresnel that can moved/slide on the object based on another object position.

Hope that make sense.

I’m building the shader in shader forge.

Cheers,
Allen

The only way a shader can know about another object is by passing that information to the shader via a custom script. This isn’t something shader forge can handle for you by itself, but you can add input parameters to the shader that you can set yourself.

Cool… I’ll look into it. Thanks for the tip. Cheers.