Post-Processed Water and Transparent Clouds

I’m having an interesting problem with the combination of post-processor water and transparent particles such as these clouds. The water processor works by calculating position from the depth buffer. Since the particles don’t write to the depth buffer, the water effect ends up being drawn right over the transparent particles. This is alleviated by moving them to the Translucent bucket, but this causes depth testing to shut off, making the clouds draw over terrain in the foreground.

Is there some way to defer cloud rendering until after the water processor while allowing the depth test to still happen?

In your cloud material set depth test to true

The depth test is set to true in the material, and I even tried re-setting it to true after placing it in the translucent bucket, but it still shows through terrain.

To make things a bit clearer, the Transparent bucket causes water to draw over clouds, while the Translucent bucket causes clouds to draw over terrain.

Hm, lets see. How do you draw/position your clouds?

The cloud particles are quads which are billboarded in the shader. They’re in the scene graph like other geometry.

Ok, so i guess the camera is above the clouds and so the rendering is correct.

If not, post a testcase so i can try it, it’s kind of hard to findbugs with nothing but a screenshot :wink:

Try add the TranslucentBucketFilter to the end of the filter stack

1 Like

That fixed it. Thank you.