Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,21 +1,33 @@
using UnrealBuildTool;
using System.IO;

public class ExtendedGraphicsProgramming : ModuleRules
{
public ExtendedGraphicsProgramming(ReadOnlyTargetRules Target) : base(Target)
{
PCHUsage = ModuleRules.PCHUsageMode.UseExplicitOrSharedPCHs;

PublicDependencyModuleNames.AddRange(new string[] {
"Core"

PrivateIncludePaths.AddRange(
new string[]
{
// … add other private include paths required here …
Path.Combine(GetModuleDirectory("Renderer"), "Internal"),
Path.Combine(GetModuleDirectory("Renderer"), "Private")
}
);

PublicDependencyModuleNames.AddRange(new string[]
{
"Core", "Engine"
});
PrivateDependencyModuleNames.AddRange(new string[] {
PrivateDependencyModuleNames.AddRange(new string[]
{
"CoreUObject",
"Projects",
"Engine",
"Slate",
"SlateCore",
"SlateCore",
"Renderer", "RenderCore", "RHICore", "RHI"
});
}
}
}
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
#include "EGP_CustomRenderPasses.h"

#include "Engine/TextureRenderTarget.h"
#include "SceneViewExtensionContext.h"
#include "TextureResource.h"
#include "Algo/AllOf.h"
#include "Components/PrimitiveComponent.h"


bool U_EGP_ViewFilter::ShouldRenderFor(const FViewport* viewport) const
Expand Down Expand Up @@ -83,7 +84,7 @@ void U_EGP_ViewFilter::RemoveByRenderTarget(UTextureRenderTarget* rt)
}
else
{
auto* resource = rt->GameThread_GetRenderTargetResource();
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why remove auto?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Prefer FTextureRenderTargetResource* to auto in this case.

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure but why? I used auto because the function name already contains the important part of the type name

FTextureRenderTargetResource* resource = rt->GameThread_GetRenderTargetResource();
//Don't interpret an uninitialized resource as a reference to all null render-targets!
if (resource != nullptr)
RemoveByRenderTarget(resource);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
#include "ExtendedGraphicsProgramming.h"

#include "ShaderCore.h"
#include "Interfaces/IPluginManager.h"
#include "Misc/Paths.h"

#define LOCTEXT_NAMESPACE "FExtendedGraphicsProgrammingModule"

Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,13 @@
#pragma once

#include <memory>

#include "CoreMinimal.h"
#include "SceneViewExtension.h"
#include "Runtime/Renderer/Private/SceneRendering.h"

#include "ExtendedGraphicsProgramming.h"
#include "Engine/TextureRenderTarget.h"

#include "EGP_CustomRenderPasses.generated.h"

Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
#pragma once

#include "CoreMinimal.h"
#include "MaterialDomain.h"
#include "MaterialShaderType.h"
#include "MaterialShared.h"
#include "Materials/Material.h"
#include "Materials/MaterialRenderProxy.h"


namespace EGP
{
//A potential fallback material that could render your shaders.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

#include "CoreMinimal.h"
#include "PrimitiveSceneInfo.h"
#include "PrimitiveSceneProxy.h"
#include "Runtime/Renderer/Private/SceneRendering.h"

namespace EGP
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
#include "MaterialDomain.h"
#include "PostProcess/PostProcessMaterialInputs.h"
#include "Runtime/Renderer/Private/SceneRendering.h"

#include "Runtime/Launch/Resources/Version.h"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What's with all these extra includes? They aren't really needed just to bump to 5.7 are they?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this include the version macro , such as ENGINE_MINOR_VERSION defined in this include.

#include "EGP_GetMaterialShader.h"

/*
Expand Down