Hi all,
my Idea:
I would like to have a shader that takes a render texture from a camera as input. And splits the texture into rows (defined be number) and flips the rows around the lower x axis. This means the first row is just transparent but all the other rows are folded downward and the last row is just not rendered anymore.
Does anyone have an idea how I could achieve this with the URP shader graph node editor?
My Scenario:
So I have 2D units positioned in a grid and want to flip them to render their mirror in water. But since it is a top down game I am not sure how to achieve this behavior. This Row based approach was my first idea how to achieve this since the flipping point for each unit would be hard to identify inside of a shader that only has the camera input as reference.
Okay sometimes I am really not thinking long enough… just adding invisible mirror units attached to the original ones that are in its own render layer is more than enough… keep it simple 
If someone wants to take a look. This is not the best solution I guess but it works.
Script on The WaterRenderReflectionCamera
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class SqareToOrthoCamShape : MonoBehaviour
{
// Remember that the Culling Mask has to be set to the layer of the mirror images
// also exclude this layer in the Culling Mask of the main Camera
// rendertexture needs to have alpha R16G16B16A16 for example
Transform thisTransform;
Camera cam;
// Update is called once per frame
void Start(){
this.thisTransform = this.GetComponent<Transform>();
cam = Camera.main;
}
void LateUpdate()
{
float height = 2f * cam.orthographicSize;
float width = height * cam.aspect;
this.thisTransform.localScale = new Vector3(width,height, 1);
}
}