Search Unity

  1. Good news ✨ We have more Unite Now videos available for you to watch on-demand! Come check them out and ask our experts any questions!
    Dismiss Notice
  2. Ever participated in one our Game Jams? Want pointers on your project? Our Evangelists will be available on Friday to give feedback. Come share your games with us!
    Dismiss Notice

Water reflection question2D URP (Lost Crypt)

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

  1. illusiveworks

    illusiveworks

    Joined:
    Oct 6, 2019
    Posts:
    15
    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?
     
unityunity