Hi,
I wanted to report some more missing PSO Precaching we found in Epic code which we have fixed locally in case it helps others:
- UCableComponent doesn’t implement CollectPSOPrecacheData or call CheckPSOPrecachingAndBoostPriority/PrecachePSOs
- UNiagaraRibbonRendererProperties::IsBackfaceCullingDisabled() reports the wrong value if bUseMaterialBackfaceCulling=true instead of Material->IsTwoSided(), which results in caching the wrong PSO
- FBasePassMeshProcessor::ShouldDraw should ignore the AutoBeforeDOFTranslucencyBoundary > 0 if Scene == nullptr (IE it’s the PSO precaching instance) so that those variants are cached also.
- MD_LightFunction materials do not reliably precache and cause hitches, UMaterialInstance::PostLoad() does not check for MD_LightFunction like UMaterial::PostLoad does, which misses instances with static permutations and even with that caching, CreateSceneProxy() on the LightComponents don’t wait for precaching before creating the FLightSceneProxy which causes hitches depite EPSOPrecacheProxyCreationStrategy::DelayUntilPSOPrecached
These fixes were fairly trivial except for the ULightComponent ones since it’s not a UPrimitiveComponent so we had to implement custom logic for calling MarkRenderStateDirty when the precache completes.
Hopefully this is helpful!