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 Invisible vertices at some angles

Discussion in 'Shaders' started by Dobbydoo, Sep 27, 2020.

  1. Dobbydoo

    Dobbydoo

    Joined:
    Jan 16, 2013
    Posts:
    2
    I have a strange problem with my water shader. I'm using gerstner waves for vertex displacement, and this works mostly fine, but at some angles some vertices disappear.

    Here's a video of the problem:


    I'm using a surface shader with tesselation for the effect, but the same problem was also prevalent when using shader graph.

    Does anyone know how to fix this?
     
  2. bgolus

    bgolus

    Joined:
    Dec 7, 2012
    Posts:
    12,329
    Correct and efficient rendering of real time transparency is an unsolved problem.

    Usually I link to my old post here on the forums where I talk about it, but instead I'll post a link to another forum where I talk about this exact case of water waves overlapping weirdly, and possibly solutions.
    https://realtimevfx.com/t/transparency-issues-in-unity/4337
     
  3. Dobbydoo

    Dobbydoo

    Joined:
    Jan 16, 2013
    Posts:
    2
    Excellently written post, thank you. I think the pre-pass might be what I'm looking for, as I'm not plannig to have any other transparent objects in the water (as of now at least, I'll leave that headache for the future...).