Translucency sorting :(


How can I solve this?
It looks really ugly when there’s a line of invisible Snow.

The render components have a field for transparency sort bias. It wont necessarily fix the snow though because you wouldn’t want underwater snowflakes to draw on top of the water’s surface. You would have to modify your content somehow to guarantee that your translucent objects can’t interpenetrate like that, like by killing the snow particles before they reach the water. This is a fundamental limitation of using blending on the GPU.

Since you’re only sorting two things, there’s a workaround. There are a few variations. It’s not perfect for all situations, but it should work here. You won’t be able to see the particles through the plane, so it would look strange if a more solid appearing particle passed through a very translucent surface.

You can check Allow Custom Depth Writes in translucent materials. Set this on your plane’s material. Check Render To Custom Depth Pass on the plane.

Keep in mind, the Opacity Mask Clip Value determines how translucent a surface can be before it’s no longer written to custom depth. This can’t be changed in translucent materials. If you need to change it, you need to set your material to masked, change it, then set your material back to translucent.

Set your particle system’s translucency sort priority higher than the plane’s.

In your particle system’s material, pass your particle opacity through something like this before output:

If DepthFromWorldPosition(WorldPosition) >= SceneTexture:CustomDepth and SceneTexture:CustomDepth > 0, Else -> OriginalParticleOpacity.