Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

Question HDRP Z clipping

Discussion in 'High Definition Render Pipeline' started by OutDoorsScene, Sep 19, 2023.

  1. OutDoorsScene

    OutDoorsScene

    Joined:
    Sep 9, 2022
    Posts:
    140
    When snapping glass materials to the ground, I receive z clipping.

    What are some of the ways to solve Z clipping in HDRP?
     
  2. Remy_Unity

    Remy_Unity

    Unity Technologies

    Joined:
    Oct 3, 2017
    Posts:
    629
    The best solution is to avoid having perfectly aligned surfaces.
    Offset the glass objet slightly so the polygons don't overlap with the ground, it should avoid z-fighting and not be noticeable at reasonable viewing distance.
     
  3. OutDoorsScene

    OutDoorsScene

    Joined:
    Sep 9, 2022
    Posts:
    140
    How would I be able to snap objects to the collider and not the mesh? So I can snap objects without having to worry about z clipping.
     
  4. Remy_Unity

    Remy_Unity

    Unity Technologies

    Joined:
    Oct 3, 2017
    Posts:
    629
    I don't think this is possible (unless you use some sort of editor script to actually do physic simulation).
    But you could simply snap the object first, then move it slightly.