Search Unity

2d Depth of field

Discussion in 'Universal Render Pipeline' started by zfh2773, Feb 8, 2020.

  1. zfh2773

    zfh2773

    Joined:
    Nov 16, 2019
    Posts:
    27
    Why does the sprite not have near and far depth of field blur, only 3d objects have it. If the sprite is in front of the 3d object, adjust the 3d object and the sprite has depth of field, for example:
     
  2. Kolyasisan

    Kolyasisan

    Joined:
    Feb 2, 2015
    Posts:
    397
    Depth Of Field calculates its results based on a depth buffer. Sprites and other objects with alpha-blended shaders usually don't write depth. Figure out how to write depth from your sprite and you'll be good to go.