Odd title, I know; I’ll explain.
I have spent a few days learning Shader Graph and putting together a fog-of-war prototype. One element of the system involves projecting a texture onto a flat plane from the point of view of the camera so that the angles look right (orthographic camera locked at 45 degrees relative to the plane). I achieve this by feeding a Postion(Space - View) node into the Sample Texture node’s UV slot via a Tile and Offset Node. The flaw, completely obvious to me now, is that the projection moves with the camera, which breaks my system.
So, my question is, is there a way to sample/freeze the initial value from the Position Node, and continue to project the texture from that angle, allowing me to move the camera without the texture following?
I am not even sure what kind of data exactly the Position Node is feeding. Considering my camera is locked at a specific angle all the time can I just feed a hard-coded value into the UV without using that node at all; any idea how I would generate that value?
It’s an unlit graph in URP by the way, though I doubt that matters for this.
I will be very, very sad if all the work I have done on this system can’t be saved for the sake of this one issue - please help.
Thanks!