Search Unity

Question What is this shader effect called?

Discussion in 'Shaders' started by JDB-Artist, Jun 17, 2022.

  1. JDB-Artist

    JDB-Artist

    Joined:
    Dec 5, 2012
    Posts:
    41
    Good day,

    I am trying to learn more about creating a certain effect however so far I have difficulty formulating the right questions to get answers. So I am resorting to a visual presentation hoping someone can explain to me what it is that I am seeing and possibly how it works.

    What you see here is a terrain mesh. I added the white wireframe to visualize the mesh.
    The cliff tiles are 3d meshes that are cliffs marking a step up in the terrain.

    upload_2022-6-17_21-23-1.png

    Somehow the cliff meshes are always rendering in a way that when the terrain would intersect the mesh, the mesh instead of the terrain is shown.

    Hopefully this second screenshot makes it clearer. Here the Terrain is again intersecting with the cliff meshes but somehow those take priority over the terrain rendering.
    upload_2022-6-17_21-29-42.png

    And here is the terrain as it is rendered without a cliff mesh placed on the same position.
    upload_2022-6-17_21-30-25.png

    So my first question after all this would be:
    Am I correct in my assumption that this effect is created by a shader?
    If so could you explain to me roughly how this works.

    upload_2022-6-17_21-23-1.png upload_2022-6-17_21-29-42.png upload_2022-6-17_21-30-25.png