Skip to content

Soft Particles (#6128)

Description:

Softens the particle quad intersection with other opaque geometry. This is done by force disabling depth writes on particle systems, then using the actual particle depth in fragment shader to blend between scene depth and particle depth. Since this only works on blended particles to begin with, this lets us use the depth sampler we've already populated in the opaque passes. It's not technically valid in OpenGL to read from a bound sampler that's also being written to (in this case to the FBO), even though depth writes are disabled, so I blit the depth buffer which is used as the new sampler.

In Action:

https://streamable.com/1s2x9a

On Performance:

There shouldn't be any significant performance hit, the approach has changed to not use an additional RTT.

Relevant settings:

[Shaders]

soft particles = true

Issues

  • A2C results in incorrect depth buffer
Edited by Cody Glassman

Merge request reports