Search Unity

  1. Unity Asset Manager is now available in public beta. Try it out now and join the conversation here in the forums.
    Dismiss Notice

Unity particle distance problem with post processing stack

Discussion in 'Graphics Experimental Previews' started by kartoonist435, Jul 28, 2017.

  1. kartoonist435

    kartoonist435

    Joined:
    Feb 14, 2015
    Posts:
    73
    Hi All,
    Has anyone encountered this issue? I'm using depth of field from the post processing stack in Unity 2017.1.0f3 and it works great, except for particles. Depth of field seems to ignore particle distance in the world. In the attached image you can see the black and red mesh particles are clear at the bottom but get fuzzy even though they are all the same distance from the camera.
     

    Attached Files:

  2. hippocoder

    hippocoder

    Digital Ape

    Joined:
    Apr 11, 2010
    Posts:
    29,723
    I think @richardkettlewell may be able to authoritatively explain because he is working on a new standard particle shader. If memory serves, there are workarounds we can use?

    For this particular situation, I would recommend cutout not transparent. This will also fix the particle shadows if you choose to enable them.
     
    kartoonist435 likes this.
  3. kartoonist435

    kartoonist435

    Joined:
    Feb 14, 2015
    Posts:
    73
    Awesome! Changing it off transparent definitely helped.
     
  4. richardkettlewell

    richardkettlewell

    Unity Technologies

    Joined:
    Sep 9, 2015
    Posts:
    2,285
    Transparent objects do not write to the depth buffer.
    Our depth of field post-effects rely on using depth information to decide on how in/out-of focus everything is.

    So to get Depth of Field, you must use opaque or cut-out.
     
    hippocoder likes this.
  5. KarlKarl2000

    KarlKarl2000

    Joined:
    Jan 25, 2016
    Posts:
    606
    @richardkettlewell @hippocoder

    Sorry just to be clear, we should be using the Standard Unity shader with the Rendering mode set to Cutout, right?

    It works in regards to the depth of field problem, but I can't seem to use the particle system's "Color Over Lifetime" option now. Do you have any suggestions?

    Thanks!
     

    Attached Files:

  6. richardkettlewell

    richardkettlewell

    Unity Technologies

    Joined:
    Sep 9, 2015
    Posts:
    2,285
    No, use Particles/Standard Unlit (or Surface)
     
  7. KarlKarl2000

    KarlKarl2000

    Joined:
    Jan 25, 2016
    Posts:
    606
    Oohhhh! Ok its good now. Thank you!