Engine Version: 5.5.1
I am currently using baked lighting with the forward renderer for my game. When I bake lighting in a level, the level continues to work fine until I close it. When I try to reopen the level, it crashes the editor on the spot with the following error message:
Fatal error: [File:D:\build\++UE5\Sync\Engine\Source\Runtime\RHICore\Public\RHICoreShader.h] [Line: 218]
Uniform buffer bound to slot 5 is not what the shader expected:
Bound : Uniform Buffer[FLocalVertexFactoryUniformShaderParameters] with Hash[0x06460718]
Expected : Uniform Buffer[LightmapResourceCluster] with Hash[0x0d830f0e]
Shader Name : <unknown>
Layout CB Size : 64
Layout Num Resources : 5
Resource Types : 6 6 6 6 6
UnrealEditor_D3D12RHI!UE::RHICore::SetResourcesFromTables<FD3D12ResourceBinder & __ptr64,FD3D12UniformBuffer * __ptr64 [16],unsigned short,0>() [D:\build\++UE5\Sync\Engine\Source\Runtime\RHICore\Public\RHICoreShader.h:218]
UnrealEditor_D3D12RHI!FD3D12CommandContext::CommitGraphicsResourceTables() [D:\build\++UE5\Sync\Engine\Source\Runtime\D3D12RHI\Private\D3D12Commands.cpp:1501]
UnrealEditor_D3D12RHI!FD3D12CommandContext::SetupDraw() [D:\build\++UE5\Sync\Engine\Source\Runtime\D3D12RHI\Private\D3D12Commands.cpp:1601]
UnrealEditor_D3D12RHI!FD3D12CommandContext::RHIDrawIndexedPrimitive() [D:\build\++UE5\Sync\Engine\Source\Runtime\D3D12RHI\Private\D3D12Commands.cpp:1714]
UnrealEditor_RHI!FRHICommandDrawIndexedPrimitive::Execute() [D:\build\++UE5\Sync\Engine\Source\Runtime\RHI\Public\RHICommandListCommandExecutes.inl:154]
UnrealEditor_Renderer!FRHICommand<FRHICommandDrawIndexedPrimitive,FRHICommandDrawIndexedPrimitiveString1692>::ExecuteAndDestruct() [D:\build\++UE5\Sync\Engine\Source\Runtime\RHI\Public\RHICommandList.h:1471]
UnrealEditor_RHI!FRHICommandListBase::Execute() [D:\build\++UE5\Sync\Engine\Source\Runtime\RHI\Private\RHICommandList.cpp:429]
UnrealEditor_RHI!FRHICommandListExecutor::FTranslateState::Translate() [D:\build\++UE5\Sync\Engine\Source\Runtime\RHI\Private\RHICommandList.cpp:906]
UnrealEditor_RHI!`FRHIComputeCommandList::EndBreadcrumbGPU'::`2'::<lambda_1>::operator()() [D:\build\++UE5\Sync\Engine\Source\Runtime\RHI\Private\RHICommandList.cpp:871]
UnrealEditor_RHI!FRHICommandListExecutor::FTaskPipe::Execute() [D:\build\++UE5\Sync\Engine\Source\Runtime\RHI\Private\RHICommandList.cpp:627]
UnrealEditor_RHI!TGraphTask<TFunctionGraphTaskImpl<void __cdecl(ENamedThreads::Type,TRefCountPtr<FBaseGraphTask> const & __ptr64),0> >::ExecuteTask() [D:\build\++UE5\Sync\Engine\Source\Runtime\Core\Public\Async\TaskGraphInterfaces.h:634]
UnrealEditor_RHI!UE::Tasks::Private::FTaskBase::TryExecuteTask() [D:\build\++UE5\Sync\Engine\Source\Runtime\Core\Public\Tasks\TaskPrivate.h:504]
UnrealEditor_RHI!LowLevelTasks::TTaskDelegate<LowLevelTasks::FTask * __ptr64 __cdecl(bool),48>::TTaskDelegateImpl<`LowLevelTasks::FTask::Init<`UE::Tasks::Private::FTaskBase::Init'::`2'::<lambda_1> >'::`13'::<lambda_1>,0>::CallAndMove() [D:\build\++UE5\Sync\Engine\Source\Runtime\Core\Public\Async\Fundamental\TaskDelegate.h:171]
UnrealEditor_Core!LowLevelTasks::FTask::ExecuteTask() [D:\build\++UE5\Sync\Engine\Source\Runtime\Core\Public\Async\Fundamental\Task.h:627]
UnrealEditor_Core!LowLevelTasks::FScheduler::ExecuteTask() [D:\build\++UE5\Sync\Engine\Source\Runtime\Core\Private\Async\Fundamental\Scheduler.cpp:245]
UnrealEditor_Core!LowLevelTasks::FScheduler::WorkerLoop() [D:\build\++UE5\Sync\Engine\Source\Runtime\Core\Private\Async\Fundamental\Scheduler.cpp:514]
UnrealEditor_Core!`LowLevelTasks::FScheduler::CreateWorker'::`2'::<lambda_1>::operator()() [D:\build\++UE5\Sync\Engine\Source\Runtime\Core\Private\Async\Fundamental\Scheduler.cpp:75]
UnrealEditor_Core!FThreadImpl::Run() [D:\build\++UE5\Sync\Engine\Source\Runtime\Core\Private\HAL\Thread.cpp:69]
UnrealEditor_Core!FRunnableThreadWin::Run() [D:\build\++UE5\Sync\Engine\Source\Runtime\Core\Private\Windows\WindowsRunnableThread.cpp:159]
I hope it’s not an issue with the forward renderer or Lightmass, because I have legitimate reasons to use them:
- I care a lot about motion clarity. Forward rendering with MSAA produces a far superior image from a motion clarity standpoint, as deferred only offers temporal solutions (which look horrible in motion) or FXAA (which has artifacting on MetaHuman hair). And yes, I and many other players absolutely do notice the blurring and smearing, so it is a legitimate issue I am trying to combat ahead of time, especially because my game is fast paced with a lot of motion.
- I need my game to run fast. I plan on shipping to consoles and I want to target a locked 60hz without having to render the game at 864p like STALKER 2 or Silent Hill 2, i.e. the base resolution needs to be very high (near or at native 4K). I also want to support a 120hz mode, which I am willing to compromise on resolution for. That’s why I’m not using Lumen/Nanite/etc. at the moment, but it’s also why I chose forward rendering as it has a much lower default cost than deferred.
I can probably afford to use deferred rendering and FXAA if I can find someone to make my characters or just do them myself, but I don’t see myself being able to afford Lumen or even SSGI (since on my PC it doesn’t seem like there’s a very large performance difference).
Notes:
- I have attempted to use D3D11 with SM5, D3D12 with SM5, and D3D12 with SM6. All three produce the exact same crash and error. I prefer to stick with D3D11 as it still seems to run better than D3D12 but I suppose it won’t really matter much.
- My startup level, which also has baked lighting, doesn’t have this issue. Any other levels that I bake lighting for all produce this exact same problem.
With all that said, does anyone have any idea why this could be happening?