Page 1 of 1

Particles sprites vs DOF

Posted: 25 Oct 2018, 13:51
by Robert
Hi,

Is it possible to use DOF with sprite's particles ?

Regards,

R

Re: Particles sprites vs DOF

Posted: 30 Oct 2018, 09:25
by stephen
Hi Robert,

yes. The Depth of Field simply uses the Depth Buffer to calculate the Amount of Blur. By default the Sprite Renderer does not write anything to the Buffer, but you can enable that in the Renderer's Material's ZBuffer Options. If "Write" is enabled it will work with DoF.

Note that this affects the Occlusion Test of the Particles so that some Particles are rendered after Particles that occlude them. This produces artifacts if you use half transparent textures on your particles. So make sure to also enable Sorting on your Sprite Renderer, to make sure the particles are rendered from the back to the front.

Best
Stephen

Re: Particles sprites vs DOF

Posted: 31 Oct 2018, 15:08
by Robert
Hi Stephen,

Thank you very much !

Robert