Particle occlusion using scene depth from a cubemap. This is basically the same idea as how you would do shadows for a point light. Breakdown in the thread. 👇
A scene capture cube can be used to capture a depth map at the time of spawning the particle. Then the cubemap depth can be used to mask particles out per pixel or per sprite.
I think this is mostly useful for radial effects such as explosions, or smoke coming from a point source. The scene capture has to be placed at the same location as the particle system origin.
If you want a soft clip instead of the hard edge one, you need to replace the "ceil" part with smooth step or something else that you like.
But when you want per sprite occlusion, the ceil based solution works just fine (cause you want them to be either visible or not). The soft mask is more useful when you are using this on a per pixel base.
Extra tip. You can use the same method for creating custom point light shadows. This might have been obvious though.
• • •
Missing some Tweet in this thread? You can try to
force a refresh