PostProcess pass failed after update from 5.0 to 5.1

Hello!
I just downloaded the 5.1 version engine, and updated my project from 5.0 to 5.1. Now it has a big problem.
In version 5.0, I created a class inheriting FSceneViewExtensionBase, then I added some post process passes using global shader. It worked well. But after updating, all of the effects disappeared. However, the effect still worked in the editor window.
For example, here is an outline pass↓


​Any ideas are welcome.
Thanks!

1 Like

​Well…sth worse happened, when I tried adding any post process material to my camera (in editor), my outline post process pass (implemented in cpp) worked but it was completely ruined.
add

I suggest checking the Unreal Engine release notes to see if there have been any changes to the post-processing pipeline that may have affected your code. If the problem persists, try creating a new project in Unreal Engine 5.1 and porting your code over to the new project. This can help you isolate any changes in the engine that may be affecting your code.

Thanks for your advice, EliasWick.
I created a new 5.1 project and created a new pass with a pixel shader just returning white color (float4(1,1,1,1)). I used FPixelShaderUtils::AddFullscreenPass. It still only worked in editor window. And also when I added a pass through post process material, there was a UV error.

1 Like

AddOnScreenDebugMessage shows that the RenderThread did load when the game started, but nothing happened.


RenderThread↓

FScreenPassTexture FExtraPPExtension::PassThrough_RenderThread(FRDGBuilder& GraphBuilder, const FSceneView& View, const FPostProcessMaterialInputs& InOutInputs)
{
	const FScreenPassTexture SceneColor = InOutInputs.Textures[(uint32)EPostProcessMaterialInput::SceneColor];
	if (!(this->EnablePassThrough)) {
		return SceneColor;
	}

	bool bIsCompute = false;

	//View
	const FViewInfo& ViewInfo = static_cast<const FViewInfo&>(View);

	//Desc
	FRDGTextureDesc TextureDesc = SceneColor.Texture->Desc;
	TextureDesc.Reset();
	TextureDesc.Flags = bIsCompute ? ETextureCreateFlags::UAV : ETextureCreateFlags::RenderTargetable;

	//Viewport
	const FScreenPassTextureViewport Viewport(SceneColor);

	//output
	FScreenPassRenderTarget Output;

	//input
	FRDGTextureRef InTexture = SceneColor.Texture;

	if (bIsCompute) 
	{

	}
	else 
	{

		GEngine->AddOnScreenDebugMessage(-1, 0.1f, FColor::Blue, TEXT("1"));
		//PS output
		FScreenPassRenderTarget OutRenderTarget(GraphBuilder.CreateTexture(TextureDesc, TEXT("PSTexture")), ERenderTargetLoadAction::ELoad);

		//Params
		FPassThroughPS::FParameters* PassParameters = GraphBuilder.AllocParameters<FPassThroughPS::FParameters>();
		PassParameters->InTexture = InTexture;
		PassParameters->Sampler = TStaticSamplerState<SF_Point, AM_Clamp, AM_Clamp, AM_Clamp>::GetRHI();
		PassParameters->RenderTargets[0] = OutRenderTarget.GetRenderTargetBinding();
		PassParameters->Input = GetScreenPassTextureViewportParameters(Viewport);

		//
		TShaderMapRef<FPassThroughPS> PixelShader(ViewInfo.ShaderMap);

		//Add Pass
		FPixelShaderUtils::AddFullscreenPass(
			GraphBuilder,
			ViewInfo.ShaderMap,
			RDG_EVENT_NAME("PassThrough (PS)"),
			PixelShader,
			PassParameters,
			ViewInfo.ViewRect);

		Output = OutRenderTarget;
	}

	if (Output.IsValid())
	{
		GEngine->AddOnScreenDebugMessage(-1, 0.1f, FColor::Blue, TEXT("2"));
		return MoveTemp(Output);
	}
	else
	{
		return SceneColor;
	}
}

I’ve reported this as a bug. Anyway, I’m sad because the whole project has stalled over this, and I really wish someone could help me with this. :slightly_frowning_face: