(This is a translation of a [Japanese [Content removed] by Kitamura Toshihide.)
Thank you for your continued support.
When dithered LOD switches, changes sometimes do not happen smoothly.
This issue still occurs even in the latest version, so I’d appreciate it if you could check it
Since Nanite is now used mainly, LOD may be a legacy feature. However, it still can be used, so I am reporting this.
再現手順
1) Unzip DitherTest.zip, and start NewMap in PIE.
2) Move the camera forward and backward, and you’ll see the material switch causing flickering.
3) If setting lod.TemporalLag to 1, switches can be slower, which may make it easier to confirm the issue.
In the project, a cube from BasicShapes has been duplicated and its LODs have been created as follows:
LOD0 … Screen Size 1
LOD1 … Screen Size 0.25
LOD2 … Screen Size 0.1
Also, the material is in DitherMat with “Dithered LOD Transition” enabled.
Hi,
thanks for reporting this issue and providing an easy repro project. I have filed a bug report and while post a link to the issue when it becomes available on the public issue tracker, so you can track its progress.
Thanks,
Sam
Hi,
the issue is now on the public issue tracker at this link.
Thanks again,
Sam
Hey all,
I have a local work around until this is resolved in 6.0. If you have access to compiling source code, add the following to SceneVisibility.cpp:
void FSceneRenderer::PrepareViewStateForVisibility(const FSceneTexturesConfig& SceneTexturesConfig)
{
...
if (ViewState)
{
ViewState->UpdateLastRenderTime(*View.Family);
ViewState->UpdateTemporalLODTransition(View);
}
// Setup global dither fade in and fade out uniform buffers.
{
FDitherUniformShaderParameters DitherUniformShaderParameters;
DitherUniformShaderParameters.LODFactor = View.GetTemporalLODTransition();
View.DitherFadeOutUniformBuffer = FDitherUniformBufferRef::CreateUniformBufferImmediate(DitherUniformShaderParameters, UniformBuffer_SingleFrame);
DitherUniformShaderParameters.LODFactor = View.GetTemporalLODTransition() - 1.0f;
View.DitherFadeInUniformBuffer = FDitherUniformBufferRef::CreateUniformBufferImmediate(DitherUniformShaderParameters, UniformBuffer_SingleFrame);
}
This change should be within the for loop over the views, and before we setup the global dither fade in/out shader parameters and buffers.