Volumetric Cloud blending issue in 5.7

We’ve recently updated our project to 5.7 (from 5.5.4), we’re seeing bad composition of our volumetric cloud over the screen:

[Image Removed]

I’ve been able to track down the issue to the new permutations of the volumetric cloud shaders “CLOUD_MIN_AND_MAX_DEPTH”.

  • Disabling compute to fallback to only having the Max depth solves our composition issues.
  • Substituting our cloud material for the cloud material in empty map also exhibits this issue.
  • Our cloud material does not exhibit this behavior in small sandbox maps (still built with world partition)

when debugging the pixels during “VolumetricComposeCloudOverScene” i can see that it takes the the front sample(bSampleFront) in “ComposeVolumetricRTOverScenePS” around line 1200. This is all fed from the volumetric cloud material, which writes to VolumetricTexture, VolumetricSecondaryTexture, and VolumetricDepthTexure with the min max depths.

I was wondering if Epic has seen this issue or can advise us as to why it’s happening?

[Attachment Removed]

Steps to Reproduce[Attachment Removed]

Hi,

Were you able to isolate this issue into a small repro project? We have seen a similar issue in our titles, but we have not been able to isolate this problem either. I am also escalating this ticket to a senior developer who will help you further. Please let us know if you have any further info.

[Attachment Removed]

Thanks Tim.

Yes I am definitely interested in a repro because I have never seen that myself locally. It happens in one of our games sometimes, but I have never been able to reproduce and debug.

[Attachment Removed]

I don’t know if i can isolate the issue, this is present in our largest streaming map, but not in our smaller maps. I can get you a pix capture with full shader debug symbols (global and material shaders) which you can use to step through or make edits on the fly.

[Attachment Removed]

That would be a great start thanks!

[Attachment Removed]

Thank you very much!

Looking at your capture, the sky dome mesh is writting depth. And that is confusing the upsampling shader assuming infinite depth for sky pixel. I have been able to reproduce on a small project now so I will try to improve/fix that.

In the meantime, you should have your artist set the sky dome mesh material use IsSky = true. That should make it not write depth and should fix the edges. Unless there is another bug causing it to write depth… Please tell me how it goes.

[Attachment Removed]

Ok so the IsSky should be the fix.

I still have put in a code fix to detect and fix such edge case: 54090711 in our ue5main perforce if you have access.

Or https://github.com/EpicGames/UnrealEngine/commit/7ebfe2b0d711c0096176a5db220f7cb0077bf347 on github.

The fix only touches VolumetricRenderTarget.usf.

[Attachment Removed]

pix file

[Attachment Removed]

pdbs

this is only the global shaders.

The meat of the issue is in “VolCloudComposeOverScene”

[Attachment Removed]