Search Unity

Water reflection question2D URP (Lost Crypt)

Discussion in 'Shaders' started by Lepisto3D, Feb 25, 2020.

  1. Lepisto3D

    Lepisto3D

    Joined:
    Oct 6, 2019
    Posts:
    27
    Hi,

    I'm developing a 2D game and I started adapting to the 2D lightning pipeline thats available now from 2019.3.

    For some help I'm using the Lost Crypt asset pack from asset store.
    In said pack, there's an area with a water reflection shader, and I can't for the world figure out how it works.

    This is the reflection
    upload_2020-2-25_13-8-51.png

    The shader is written in Shader Graph and has a few settings that you can change.
    upload_2020-2-25_13-9-23.png

    The one setting that seems to project the reflection is the render texture.
    It's assigned from this file.
    upload_2020-2-25_13-10-2.png

    There is also and ortographic camera involved for the reflection which somehow is scaled exactly the way the water plane is scaled. I don't understand how to do this either.
    upload_2020-2-25_13-10-53.png

    I tried basically copy pasting it over to my own project and adjusting some settings, but what I can't get to work is the reflection. How do I reproduce this water reflection camera piece, and how do I create a ".renderTexture" file?
    This is how it looks in the shader graph file.
    upload_2020-2-25_13-14-11.png

    I suppose there's a step way of doing this correctly, otherwise the camera reflection won't apply correctly? What am I missing?
     
  2. odec

    odec

    Joined:
    Jan 23, 2020
    Posts:
    1

    Hi,

    I was just looking for this as well and found a nice tutorial here:



    Kind regards!