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


    Oct 6, 2019

    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

    The shader is written in Shader Graph and has a few settings that you can change.

    The one setting that seems to project the reflection is the render texture.
    It's assigned from this file.

    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.

    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.

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