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. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice
  3. Join us on November 16th, 2023, between 1 pm and 9 pm CET for Ask the Experts Online on Discord and on Unity Discussions.
    Dismiss Notice
  4. Dismiss Notice

HDRP Depth Buffer >> VFX Graph & Depth Collisions

Discussion in 'High Definition Render Pipeline' started by kurmudgeon, Feb 7, 2020.

  1. kurmudgeon

    kurmudgeon

    Joined:
    Jun 11, 2016
    Posts:
    1
    Having some issues getting depth collisions to work with vfx graph:
    - Unity 2019.3.0f5
    - HDRP 7.1.8
    - VFX Graph 7.1.7
    - OSX + Metal graphics API

    It appears that the node works, but only for the near and far clip plane of the camera. I have several spheres in the scene using the default HDRP/Lit Shader that do not appear to have any impact on the depthBuffer.

    Using the Default Render Settings and Default HDRP Asset.

    Not looking for a full solution, just maybe some insights into what I may be missing.

    Thanks!

    Reference Images below:


    Particles Pass right through spheres
     
  2. Olmi

    Olmi

    Joined:
    Nov 29, 2012
    Posts:
    1,553
    I'm not sure if it's the correct way or not, but I rendered the Depth buffer to a texture, then plugged that texture to the Depth Buffer input of the Collide with Depth Buffer. But it was older Unity and VFX Graph version, I'd need to test on the latest version.

    I did that almost a year ago so my memory is bit vague ... But I did get it working as I recorded some videos.
     
  3. spiegelball

    spiegelball

    Joined:
    Mar 2, 2020
    Posts:
    16
    Has your camera the "Link FOV to physical" check enabled? Had to disable this to make depth collision work (bug probably)...
     
    doc_unity likes this.