Since version 4.18 there is an exception in “Client game mode” only. Not in Editor mode.
template< typename ShaderRHIParamRef, typename TRHICmdList >
void FSceneTextureShaderParameters::Set(
TRHICmdList& RHICmdList,
const ShaderRHIParamRef& ShaderRHI,
const FSceneView& View,
const EDeferredParamStrictness ParamStrictness,
ESceneRenderTargetsMode::Type TextureMode,
ESamplerFilter ColorFilter ) const
{
FTextureRHIParamRef BlackDefault2D = GSystemTextures.BlackDummy->GetRenderTargetItem().ShaderResourceTexture;
FTextureRHIParamRef DepthDefault = GSystemTextures.DepthDummy->GetRenderTargetItem().ShaderResourceTexture;
Since BlackDummy and DepthDummy are null an exception occurred.
I think you should test if null to avoid exception.
I modified the code to initialize the system textures to avoid this exception.
template< typename ShaderRHIParamRef, typename TRHICmdList >
void FSceneTextureShaderParameters::Set(
TRHICmdList& RHICmdList,
const ShaderRHIParamRef& ShaderRHI,
const FSceneView& View,
const EDeferredParamStrictness ParamStrictness,
ESceneRenderTargetsMode::Type TextureMode,
ESamplerFilter ColorFilter ) const
{
/** @remark:
* Since in client game mode the function to initialize system texture is never called
* The members BlackDummy and DepthDummy are null, check texture to avoid exception.
*/
FTextureRHIParamRef BlackDefault2D = (GSystemTextures.BlackDummy != nullptr) ? GSystemTextures.BlackDummy->GetRenderTargetItem().ShaderResourceTexture : nullptr;
FTextureRHIParamRef DepthDefault = (GSystemTextures.DepthDummy != nullptr) ? GSystemTextures.DepthDummy->GetRenderTargetItem().ShaderResourceTexture : nullptr;
/** @remark: end of modification */
Now I don’t know why the system textures are not initialized in “client mode” and not in “editor mode”.