UDN: [Link Removed]
Slack: [Link Removed]

Then, the return value of TryAddMeshBatch is determined by FBasePassMeshProcessor::Process. When the crash occurs, GetBasePassShaders fails to get the shader in FBasePassMeshProcessor::Process for the translucent Material, and the return value is False, which causes Fallback. Then, it fails to get the shader until it reaches the basic Base Material. It, then, performs Fallback to WorldGridMaterial. GetBasePassShaders succeeds in getting the shader for WorldGridMaterial so that the subsequent code will be run. However, as bTranslucentBasePass of FBasePassMeshProcessor is still True, SetTranslucentRenderState is run and BuildMeshDrawCommands is performed with no BlendState being set, which causes the assert failure.

FBasePassMeshProcessor caches off the following state from the original material: bTranslucentBasePass, but when we fallback to the WorldGridMaterial, which isn't translucent, we have a mismatch between the cached state on the processor and the current material we are rendering with. We have two options:

  1. We should re-cache bTranslucentBasePass on the mesh pass processor when we pick a new fallback to render with.
  2. We might have to special case the logic here to ignore bTranslucentBasePass if we are falling back to WorldGridMaterial

Have Comments or More Details?

There's no existing public thread on this issue, so head over to Questions & Answers just mention UE-175500 in the post.

Login to Vote

CreatedJan 30, 2023
UpdatedJan 18, 2024