Search Unity

Post Processing DOF render broke

Discussion in 'General Graphics' started by tungtung_, Dec 31, 2020.

  1. tungtung_

    tungtung_

    Joined:
    Oct 25, 2019
    Posts:
    1
    I'm using 2018.1 with PPV2(2.3.0) developing a VR project
    When I using the depth of field effect, the blur part just go gray as the picture shown at the right side
    upload_2020-12-31_16-18-20.png
    (the left side is the camera with PP debug)
    Does anyone had this issue before and how should I fix it?
     
  2. bgolus

    bgolus

    Joined:
    Dec 7, 2012
    Posts:
    12,352
    Looks like the shader you’re using to draw the render texture onto the surface is using alpha blending. The DoF effect stores temporary data in the alpha channel for efficiency, and normally when display to the screen the alpha channel is ignored so it doesn’t matter if there’s random data there. But since you’re putting that render texture on a mesh in the world, you need to make sure you’re using a material that isn’t doing any transparency, or is at least ignoring the alpha from the texture.