Files
UnrealEngineUWP/Engine/Plugins/Runtime/nDisplay/Source/DisplayClusterShaders/Private/DisplayClusterShadersModule.cpp
peter tarasenko b11298ae85 [nDisplay]
Refactored the public DCMeshComponent APIs.
Added support for procedural and static mesh components for OutputRemap.
Removed spam in logs.
Added UVs remap for Mesh projection policy
Fixed Horde Issue 125526 (nDisplay related code)

#jira none
#rb Alejandro.Arango, Vitalii.Boiko
#preflight  61c2461ce82d191a14e3e834

#ROBOMERGE-AUTHOR: peter.tarasenko
#ROBOMERGE-SOURCE: CL 18491393 in //UE5/Release-5.0/... via CL 18491395
#ROBOMERGE-BOT: STARSHIP (Release-Engine-Staging -> Release-Engine-Test) (v899-18417669)

[CL 18491396 by peter tarasenko in ue5-release-engine-test branch]
2021-12-22 05:30:41 -05:00

62 lines
2.9 KiB
C++

// Copyright Epic Games, Inc. All Rights Reserved.
#include "DisplayClusterShadersModule.h"
#include "Interfaces/IPluginManager.h"
#include "Misc/Paths.h"
#include "ShaderCore.h"
#include "Shaders/DisplayClusterShadersPostprocess_Blur.h"
#include "Shaders/DisplayClusterShadersPostprocess_OutputRemap.h"
#include "Shaders/DisplayClusterShadersWarpblend_ICVFX.h"
#include "Shaders/DisplayClusterShadersWarpblend_MPCDI.h"
#include "Shaders/DisplayClusterShadersGenerateMips.h"
//////////////////////////////////////////////////////////////////////////////////////////////
// IModuleInterface
//////////////////////////////////////////////////////////////////////////////////////////////
#define NDISPLAY_SHADERS_MAP TEXT("/Plugin/nDisplay")
void FDisplayClusterShadersModule::StartupModule()
{
if (!AllShaderSourceDirectoryMappings().Contains(NDISPLAY_SHADERS_MAP))
{
FString PluginShaderDir = FPaths::Combine(IPluginManager::Get().FindPlugin(TEXT("nDisplay"))->GetBaseDir(), TEXT("Shaders"));
AddShaderSourceDirectoryMapping(NDISPLAY_SHADERS_MAP, PluginShaderDir);
}
}
void FDisplayClusterShadersModule::ShutdownModule()
{
}
bool FDisplayClusterShadersModule::RenderWarpBlend_MPCDI(FRHICommandListImmediate& RHICmdList, const FDisplayClusterShaderParameters_WarpBlend& InWarpBlendParameters) const
{
return FDisplayClusterShadersWarpblend_MPCDI::RenderWarpBlend_MPCDI(RHICmdList, InWarpBlendParameters);
}
bool FDisplayClusterShadersModule::RenderWarpBlend_ICVFX(FRHICommandListImmediate& RHICmdList, const FDisplayClusterShaderParameters_WarpBlend& InWarpBlendParameters, const FDisplayClusterShaderParameters_ICVFX& InICVFXParameters) const
{
return FDisplayClusterShadersWarpblend_ICVFX::RenderWarpBlend_ICVFX(RHICmdList, InWarpBlendParameters, InICVFXParameters);
}
bool FDisplayClusterShadersModule::RenderPostprocess_OutputRemap(FRHICommandListImmediate& RHICmdList, FRHITexture2D* InSourceTexture, FRHITexture2D* InRenderTargetableDestTexture, const IDisplayClusterRender_MeshComponentProxy& MeshProxy) const
{
return FDisplayClusterShadersPostprocess_OutputRemap::RenderPostprocess_OutputRemap(RHICmdList, InSourceTexture, InRenderTargetableDestTexture, MeshProxy);
}
bool FDisplayClusterShadersModule::RenderPostprocess_Blur(FRHICommandListImmediate& RHICmdList, FRHITexture2D* InSourceTexture, FRHITexture2D* InRenderTargetableDestTexture, const FDisplayClusterShaderParameters_PostprocessBlur& InSettings) const
{
return FDisplayClusterShadersPostprocess_Blur::RenderPostprocess_Blur(RHICmdList, InSourceTexture, InRenderTargetableDestTexture, InSettings);
}
bool FDisplayClusterShadersModule::GenerateMips(FRHICommandListImmediate& RHICmdList, FRHITexture2D* InOutMipsTexture, const FDisplayClusterShaderParameters_GenerateMips& InSettings) const
{
return FDisplayClusterShadersGenerateMips::GenerateMips(RHICmdList, InOutMipsTexture, InSettings);
}
IMPLEMENT_MODULE(FDisplayClusterShadersModule, DisplayClusterShaders);