Fake vertex offset in shader graph

Hi,

I’m trying to achieve simple fake depth effect by rendering a quad texture without vertex offset. My idea is to manipulate UV through position offsets and it works pretty well for the ortho camera (obviously), but perspective camera uv deformation / transformations is something I can’t get rid of. Is anyone able to help me with some basic math in my exercise? :slight_smile:




Thanks!

Isn’t this pretty close to what you could achieve with parallax mapping style implementation?
Learn OpenGL has a very good write up about this topic, I think you can find good pointers there.

1 Like

Omg, exactly! Thank you very much, sir! :slight_smile:

For anyone else, who is wondering. This is the key setup for shader graph

3 Likes

Btw, remember you can always use Custom Function Nodes, this makes it easier to implement more complex things. Or at least less messy (imho.)

1 Like