Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Question Shader is opaque but shadows visible through shader (image provided)

Discussion in 'Shader Graph' started by MMeyers23, Jan 4, 2020.

  1. MMeyers23

    MMeyers23

    Joined:
    Dec 29, 2019
    Posts:
    101
    Hi I am have a real issue here, made a water shader that needs to have is surface setting as transparent in order to use the camera depth utility to create a water foam effect around objects intersecting the water plane. However I dont want to see the objects beneath the water surface. So I put the alpha of the water shade to 1. Yet I can still see a dark outline of objects beneath the water surface. When I turn off shadows, this disappears. Can anyone help? Thanks. I also tried toggling "receive shadows" on and off for objects, which apparently does absolutely nothing in the version I am using (2019.3)...

    example image: https://drive.google.com/open?id=186Vy9sthjtASmzK1Z5HY4NglP1xCGMQ3
     

    Attached Files:

  2. bgolus

    bgolus

    Joined:
    Dec 7, 2012
    Posts:
    12,329
    This is a long time bug that’s been fixed by Unity already, I think in URP 7.1.7. I’m not sure if that version of the URP is exposed to the Package Manager, or which versions of Unity it works with. My guess is it requires 2019.3 or better.
     
  3. MMeyers23

    MMeyers23

    Joined:
    Dec 29, 2019
    Posts:
    101
    Thanks for the reply! Unfortunately URP 7.17 is installed in my project and the LWRP is removed. This has not resolved the problem, unfortunately.
     
  4. bgolus

    bgolus

    Joined:
    Dec 7, 2012
    Posts:
    12,329
    Honestly, I don't entirely understand how they post new builds, but you're right it looks like it isn't in 7.1.7 either.

    The bug was fixed in a branch that was supposedly merged into the master branch on Nov 28th
    https://github.com/Unity-Technologies/ScriptableRenderPipeline/pull/4979

    Version 7.1.7 was labelled & released a little over a week and later, but does not appear to have those changes yet. So, not sure what version it'll be released in.