How would I find the position of a second camera in the scene in shader graph?
Does the camera node reference the MainCamera only? The doc says it references the Camera’s GameObject. How would I get the position of a second Orthographic Camera that is rendering one layer?
The goal is to project the trail information onto the RenderTexture and use the texture to apply to a mask in global position to deform the mesh. Problem right now is when the camera follows the player, the mesh will deform in the middle outwards because the camera is rendering the player in the middle at all times and applying the changes to object position, and not world position.
I’ve managed to get it working on a static second camera, but struggled with a moving camera that follows the player. The direction I’m heading is:
- Get position of second camera
- Render trail information onto mask
- Transform the camera position from object to world
- Apply the world coord of the trail information onto the plane mesh
Not sure if this is the way to go, any feedback would be great!