Particles are drawn above/under decals based on camera angle instead of physical position

https://vid.me/eZTD

It appears to depend on whether the camera is pointing above or below the horizon. If below, particles are drawn below the decal. If above, particles are drawn above the decal. From the camera’s perspective, the part that contains the ParticleEmitter is in front of the face with the decal, so particles should always be drawn on top of the decal.

ParticleBugRepro.rbxl (11.5 KB)

2 Likes

This is intended. A Decal isn’t a physical thing - it’s a texture on a transparent part. Transparent parts appear in depth order instead of each face occluding each other face the way you would expect. Particles do the same thing. So if the center of your transparent part is closer to the camera than the center of your particle part your decal will appear on top of the particles.

Here’s an explanation of what @Sharksie means using a different example:

This seems like a problem. From a developer’s and player’s standpoint, a texture in 3d space should behave like anything else in 3d space.

Unfortunately the solution to this is per-pixel layering, which is prohibitively expensive. Every game engine that I know of has this same problem.

It seems there has been a change to the depth sort for the worse. I can’t explain it exactly, but it seems like it had better performance.