Search Unity

Question custom shaders not overlapping well.

Discussion in 'Shader Graph' started by KHam256, Mar 30, 2021.

  1. KHam256

    KHam256

    Joined:
    Sep 17, 2016
    Posts:
    19
    upload_2021-3-30_0-28-59.png

    in the example, my distortion shader is not drawing the water shader. setting the distortion shader to a higher render queue does nothing. Setting the water shader higher just layers the distortion below the water, of course. I'm no shader expert, I'm not sure where to look here.
     
  2. KHam256

    KHam256

    Joined:
    Sep 17, 2016
    Posts:
    19
    A little more context about how the distortion shader is made, It's nothing more than Scene Position being combined with Scene Color with a bit of shader math. Is my Scene Color just not picking up the water shader?
     
  3. KHam256

    KHam256

    Joined:
    Sep 17, 2016
    Posts:
    19
    stripping the distortion shader of everything but Scene Color confirms that the water shader is not picking up the water shader
     
  4. bgolus

    bgolus

    Joined:
    Dec 7, 2012
    Posts:
    12,342
    The Scene Color node is sampling the “Opaque Texture”, so named because it is a copy of the rendered scene after all opaque objects (and the sky) have rendered. Any transparent objects will not appear in it. There is no easy work around for this as it’s an intended limitation of the SRPs.
     
    Olmi likes this.