cannot open include file "ScreenPass.h" No such file or directory

Hello!
When I editing my plugin I added

#include "Runtime/Renderer/Private/PostProcess/PostProcessMaterial.h"
#include "Runtime/Renderer/Private/PostProcess/PostProcessing.h"

Then I got an error in PostProcessMaterial.h:
cannot open source file “ScreenPass.h”
cannot open include file “ScreenPass.h” No such file or directory

Can someone help?
Thanks!

I tried adding “Renderer” to MyPlugin.Build.cs, but it didn’t work. :frowning_face:

What is the class you’re trying to use from PostProcessMaterial?

They are:
struct FPostProcessMaterialInputs
enum class EPostProcessMaterialInput

I would like to emulate the examples in ‘PostProcessPassAfterXXXXXX_RenderThread’.
If I comment out #include, I’ll get an error here

FScreenPassTexture FMyExtension::PostProcessPassAfterTonemap_RenderThread(FRDGBuilder& GraphBuilder, const FSceneView& View, const FPostProcessMaterialInputs& InOutInputs)
{
	//error↓
	const FScreenPassTexture SceneColor = InOutInputs.Textures[(uint32)EPostProcessMaterialInput::SceneColor];
    ...
}

There are some use cases in engine:
FScreenPassTexture PostProcessPassAfterFxaa_RenderThread(…)
in PixelInspector.cpp

FScreenPassTexture PostProcessPassAfterTonemap_RenderThread(…)
in OpenColorIODisplayExtension.cpp

These cases use
#include “PostProcess/PostProcessing.h”
and
#include “PostProcess/PostProcessMaterial.h”
I think it’s necessary.

I often see error messages in VS, but they usually don’t affect building. This time I couldn’t build it.

Hi Min1,

Check out this page here, you need to add the private folder to your folder include path:

1 Like

Thanks! It worked. :slightly_smiling_face:

PublicIncludePaths.AddRange(
	new string[] {
		// ... add public include paths required here ...
		"Runtime/Renderer/Private",
	}
	);

This is how I implemented it in 5.0↑

1 Like