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

LineRenderer / VFX Graph doesn't play nice with Depth of Field in URP

Discussion in 'Editor & General Support' started by Charlicopter, Jun 1, 2020.

  1. Charlicopter

    Charlicopter

    Joined:
    May 15, 2017
    Posts:
    125
    I have a Post Processing Volume on a camera layer with the Depth of Field override active.
    I think this is a depth buffer issue: When Line Renderers or VFX elements are drawn over the top of an object, the depth of field applies as though that line renderer or VFX is at the depth of the object it overlaps. When there is no object behind the line renderer or VFX, it applies the depth of field as though it was at infinity.

    Is it possible I'm doing something wrong? Perhaps a draw-order issue? Or could this be a bug/unsupported use case?

    Edit: 2019.3.14f1

    DepthOfFieldBug.PNG
     
    billw2011 likes this.
  2. billw2011

    billw2011

    Joined:
    Apr 5, 2014
    Posts:
    15
    Its the material itself, not specifically the LineRenderer, try a different material. I had the same problem, I was using sprite-unlit material.
    /edit: Actually it is transparency that is the problem.
     
    Last edited: Aug 2, 2020
    The_Light_of_Star likes this.