2014-12-07 19:09:38 -05:00
// Copyright 1998-2015 Epic Games, Inc. All Rights Reserved.
2014-03-14 14:13:41 -04:00
/*=============================================================================
PostProcessSelectionOutline . cpp : Post processing outline effect .
= = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = */
# include "RendererPrivate.h"
# include "PostProcessing.h"
# include "SceneFilterRendering.h"
# include "PostProcessSelectionOutline.h"
# include "OneColorShader.h"
2014-08-21 06:03:00 -04:00
# include "SceneUtils.h"
2014-03-14 14:13:41 -04:00
///////////////////////////////////////////
// FRCPassPostProcessSelectionOutlineColor
///////////////////////////////////////////
void FRCPassPostProcessSelectionOutlineColor : : Process ( FRenderingCompositePassContext & Context )
{
2014-10-20 10:43:43 -04:00
SCOPED_DRAW_EVENT ( Context . RHICmdList , PostProcessSelectionOutlineBuffer ) ;
2014-03-14 14:13:41 -04:00
const FPooledRenderTargetDesc * SceneColorInputDesc = GetInputDesc ( ePId_Input0 ) ;
if ( ! SceneColorInputDesc )
{
// input is not hooked up correctly
return ;
}
const FViewInfo & View = Context . View ;
FIntRect ViewRect = View . ViewRect ;
FIntPoint SrcSize = SceneColorInputDesc - > Extent ;
// Get the output render target
const FSceneRenderTargetItem & DestRenderTarget = PassOutputs [ 0 ] . RequestSurface ( Context ) ;
// Set the render target/viewport.
2014-06-12 07:13:34 -04:00
SetRenderTarget ( Context . RHICmdList , FTextureRHIParamRef ( ) , DestRenderTarget . TargetableTexture ) ;
2014-03-14 14:13:41 -04:00
// This is a reversed Z depth surface, so 0.0f is the far plane.
2015-03-31 14:02:45 -04:00
Context . RHICmdList . Clear ( false , FLinearColor ( 0 , 0 , 0 , 0 ) , true , ( float ) ERHIZBuffer : : FarPlane , true , 0 , FIntRect ( ) ) ;
2014-03-14 14:13:41 -04:00
Context . SetViewportAndCallRHI ( ViewRect ) ;
2014-08-12 18:24:52 -04:00
if ( View . Family - > EngineShowFlags . Selection )
2014-03-14 14:13:41 -04:00
{
2014-11-25 17:56:43 -05:00
FHitProxyDrawingPolicyFactory : : ContextType FactoryContext ;
2014-03-14 14:13:41 -04:00
2014-11-25 17:56:43 -05:00
//@todo - use memstack
TMap < FName , int32 > ActorNameToStencilIndex ;
2015-02-09 11:52:11 -05:00
TMap < const FPrimitiveSceneProxy * , int32 > IndividuallySelectedProxies ;
2014-11-25 17:56:43 -05:00
ActorNameToStencilIndex . Add ( NAME_BSP , 1 ) ;
Context . RHICmdList . SetRasterizerState ( TStaticRasterizerState < > : : GetRHI ( ) ) ;
Context . RHICmdList . SetBlendState ( TStaticBlendStateWriteMask < CW_NONE , CW_NONE , CW_NONE , CW_NONE > : : GetRHI ( ) ) ;
for ( int32 MeshBatchIndex = 0 ; MeshBatchIndex < View . DynamicMeshElements . Num ( ) ; MeshBatchIndex + + )
2014-03-14 14:13:41 -04:00
{
2014-11-25 17:56:43 -05:00
const FMeshBatchAndRelevance & MeshBatchAndRelevance = View . DynamicMeshElements [ MeshBatchIndex ] ;
const FPrimitiveSceneProxy * PrimitiveSceneProxy = MeshBatchAndRelevance . PrimitiveSceneProxy ;
2014-03-14 14:13:41 -04:00
2015-02-09 11:52:11 -05:00
# if WITH_EDITOR
// Selected actors should be subdued if any component is individually selected
bool bActorSelectionColorIsSubdued = View . bHasSelectedComponents ;
# else
bool bActorSelectionColorIsSubdued = false ;
# endif
2014-11-25 17:56:43 -05:00
if ( PrimitiveSceneProxy - > IsSelected ( ) & & MeshBatchAndRelevance . Mesh - > bUseSelectionOutline )
2014-03-14 14:13:41 -04:00
{
2015-02-09 11:52:11 -05:00
const int32 * AssignedStencilIndexPtr = PrimitiveSceneProxy - > IsIndividuallySelected ( ) ? IndividuallySelectedProxies . Find ( PrimitiveSceneProxy ) : ActorNameToStencilIndex . Find ( PrimitiveSceneProxy - > GetOwnerName ( ) ) ;
2014-08-12 18:24:52 -04:00
2014-11-25 17:56:43 -05:00
if ( ! AssignedStencilIndexPtr )
2014-03-14 14:13:41 -04:00
{
2015-02-09 11:52:11 -05:00
if ( PrimitiveSceneProxy - > IsIndividuallySelected ( ) )
{
// Any component that is individually selected should have a stencil value of < 128 so that it can have a unique color. We offset the value by 2 because 0 means no selection and 1 is for bsp
int32 StencilValue = IndividuallySelectedProxies . Num ( ) % 126 + 2 ;
AssignedStencilIndexPtr = & IndividuallySelectedProxies . Add ( PrimitiveSceneProxy , StencilValue ) ;
}
else
{
// If we are subduing actor color highlight then use the top level bits to indicate that to the shader.
int32 StencilValue = bActorSelectionColorIsSubdued ? ActorNameToStencilIndex . Num ( ) % 128 + 128 : ActorNameToStencilIndex . Num ( ) % 126 + 2 ;
AssignedStencilIndexPtr = & ActorNameToStencilIndex . Add ( PrimitiveSceneProxy - > GetOwnerName ( ) , StencilValue ) ;
}
2014-03-14 14:13:41 -04:00
}
2014-11-25 17:56:43 -05:00
// Note that the stencil value will overflow with enough selected objects
2015-04-01 10:53:07 -04:00
Context . RHICmdList . SetDepthStencilState ( TStaticDepthStencilState < true , CF_DepthNearOrEqual , true , CF_Always , SO_Keep , SO_Keep , SO_Replace > : : GetRHI ( ) , * AssignedStencilIndexPtr ) ;
2014-11-25 17:56:43 -05:00
const FMeshBatch & MeshBatch = * MeshBatchAndRelevance . Mesh ;
FHitProxyDrawingPolicyFactory : : DrawDynamicMesh ( Context . RHICmdList , View , FactoryContext , MeshBatch , false , true , MeshBatchAndRelevance . PrimitiveSceneProxy , MeshBatch . BatchHitProxyId ) ;
2014-08-12 18:24:52 -04:00
}
}
2014-11-25 17:56:43 -05:00
2014-03-14 14:13:41 -04:00
// to get an outline around the objects if it's partly outside of the screen
{
FIntRect InnerRect = ViewRect ;
// 1 as we have an outline that is that thick
InnerRect . InflateRect ( - 1 ) ;
// We could use Clear with InnerRect but this is just an optimization - on some hardware it might do a full clear (and we cannot disable yet)
2014-06-27 11:07:13 -04:00
// RHICmdList.Clear(false, FLinearColor(0, 0, 0, 0), true, 0.0f, true, 0, InnerRect);
2014-03-14 14:13:41 -04:00
// so we to 4 clears - one for each border.
// top
2014-06-12 07:13:34 -04:00
Context . RHICmdList . SetScissorRect ( true , ViewRect . Min . X , ViewRect . Min . Y , ViewRect . Max . X , InnerRect . Min . Y ) ;
2015-03-31 14:02:45 -04:00
Context . RHICmdList . Clear ( false , FLinearColor ( 0 , 0 , 0 , 0 ) , true , ( float ) ERHIZBuffer : : FarPlane , true , 0 , FIntRect ( ) ) ;
2014-03-14 14:13:41 -04:00
// bottom
2014-06-12 07:13:34 -04:00
Context . RHICmdList . SetScissorRect ( true , ViewRect . Min . X , InnerRect . Max . Y , ViewRect . Max . X , ViewRect . Max . Y ) ;
2015-03-31 14:02:45 -04:00
Context . RHICmdList . Clear ( false , FLinearColor ( 0 , 0 , 0 , 0 ) , true , ( float ) ERHIZBuffer : : FarPlane , true , 0 , FIntRect ( ) ) ;
2014-03-14 14:13:41 -04:00
// left
2014-06-12 07:13:34 -04:00
Context . RHICmdList . SetScissorRect ( true , ViewRect . Min . X , ViewRect . Min . Y , InnerRect . Min . X , ViewRect . Max . Y ) ;
2015-03-31 14:02:45 -04:00
Context . RHICmdList . Clear ( false , FLinearColor ( 0 , 0 , 0 , 0 ) , true , ( float ) ERHIZBuffer : : FarPlane , true , 0 , FIntRect ( ) ) ;
2014-03-14 14:13:41 -04:00
// right
2014-06-12 07:13:34 -04:00
Context . RHICmdList . SetScissorRect ( true , InnerRect . Max . X , ViewRect . Min . Y , ViewRect . Max . X , ViewRect . Max . Y ) ;
2015-03-31 14:02:45 -04:00
Context . RHICmdList . Clear ( false , FLinearColor ( 0 , 0 , 0 , 0 ) , true , ( float ) ERHIZBuffer : : FarPlane , true , 0 , FIntRect ( ) ) ;
2014-03-14 14:13:41 -04:00
2014-06-12 07:13:34 -04:00
Context . RHICmdList . SetScissorRect ( false , 0 , 0 , 0 , 0 ) ;
2014-03-14 14:13:41 -04:00
}
}
// Resolve to the output
2014-06-12 07:13:34 -04:00
Context . RHICmdList . CopyToResolveTarget ( DestRenderTarget . TargetableTexture , DestRenderTarget . ShaderResourceTexture , false , FResolveParams ( ) ) ;
2014-03-14 14:13:41 -04:00
}
FPooledRenderTargetDesc FRCPassPostProcessSelectionOutlineColor : : ComputeOutputDesc ( EPassOutputId InPassOutputId ) const
{
FPooledRenderTargetDesc Ret = PassInputs [ 0 ] . GetOutput ( ) - > RenderTargetDesc ;
Ret . Reset ( ) ;
Ret . Format = PF_DepthStencil ;
Ret . Flags = TexCreate_None ;
Ret . TargetableFlags = TexCreate_DepthStencilTargetable ;
Ret . DebugName = TEXT ( " SelectionDepthStencil " ) ;
Ret . NumSamples = GSceneRenderTargets . GetEditorMSAACompositingSampleCount ( ) ;
return Ret ;
}
///////////////////////////////////////////
// FRCPassPostProcessSelectionOutline
///////////////////////////////////////////
/**
* Pixel shader for rendering the selection outline
*/
template < uint32 MSAASampleCount >
class FPostProcessSelectionOutlinePS : public FGlobalShader
{
DECLARE_SHADER_TYPE ( FPostProcessSelectionOutlinePS , Global ) ;
static bool ShouldCache ( EShaderPlatform Platform )
{
if ( ! IsFeatureLevelSupported ( Platform , ERHIFeatureLevel : : SM5 ) )
{
if ( MSAASampleCount > 1 )
{
return false ;
}
}
2014-08-25 14:41:54 -04:00
return IsFeatureLevelSupported ( Platform , ERHIFeatureLevel : : SM4 ) ;
2014-03-14 14:13:41 -04:00
}
static void ModifyCompilationEnvironment ( EShaderPlatform Platform , FShaderCompilerEnvironment & OutEnvironment )
{
FGlobalShader : : ModifyCompilationEnvironment ( Platform , OutEnvironment ) ;
OutEnvironment . SetDefine ( TEXT ( " MSAA_SAMPLE_COUNT " ) , MSAASampleCount ) ;
}
/** Default constructor. */
FPostProcessSelectionOutlinePS ( ) { }
public :
FPostProcessPassParameters PostprocessParameter ;
FDeferredPixelShaderParameters DeferredParameters ;
FShaderParameter OutlineColor ;
2015-02-09 11:52:11 -05:00
FShaderParameter SubduedOutlineColor ;
2014-03-14 14:13:41 -04:00
FShaderParameter BSPSelectionIntensity ;
FShaderResourceParameter PostprocessInput1MS ;
FShaderResourceParameter EditorPrimitivesStencil ;
FShaderParameter EditorRenderParams ;
/** Initialization constructor. */
FPostProcessSelectionOutlinePS ( const ShaderMetaType : : CompiledShaderInitializerType & Initializer )
: FGlobalShader ( Initializer )
{
PostprocessParameter . Bind ( Initializer . ParameterMap ) ;
DeferredParameters . Bind ( Initializer . ParameterMap ) ;
OutlineColor . Bind ( Initializer . ParameterMap , TEXT ( " OutlineColor " ) ) ;
2015-02-09 11:52:11 -05:00
SubduedOutlineColor . Bind ( Initializer . ParameterMap , TEXT ( " SubduedOutlineColor " ) ) ;
2014-03-14 14:13:41 -04:00
BSPSelectionIntensity . Bind ( Initializer . ParameterMap , TEXT ( " BSPSelectionIntensity " ) ) ;
PostprocessInput1MS . Bind ( Initializer . ParameterMap , TEXT ( " PostprocessInput1MS " ) ) ;
EditorRenderParams . Bind ( Initializer . ParameterMap , TEXT ( " EditorRenderParams " ) ) ;
EditorPrimitivesStencil . Bind ( Initializer . ParameterMap , TEXT ( " EditorPrimitivesStencil " ) ) ;
}
2014-06-12 07:13:34 -04:00
void SetPS ( const FRenderingCompositePassContext & Context )
2014-03-14 14:13:41 -04:00
{
const FPixelShaderRHIParamRef ShaderRHI = GetPixelShader ( ) ;
2014-06-12 07:13:34 -04:00
FGlobalShader : : SetParameters ( Context . RHICmdList , ShaderRHI , Context . View ) ;
2014-03-14 14:13:41 -04:00
2014-06-12 07:13:34 -04:00
DeferredParameters . Set ( Context . RHICmdList , ShaderRHI , Context . View ) ;
2014-03-14 14:13:41 -04:00
const FPostProcessSettings & Settings = Context . View . FinalPostProcessSettings ;
const FSceneViewFamily & ViewFamily = * ( Context . View . Family ) ;
FSceneViewState * ViewState = ( FSceneViewState * ) Context . View . State ;
2014-06-12 07:13:34 -04:00
PostprocessParameter . SetPS ( ShaderRHI , Context , TStaticSamplerState < SF_Point , AM_Clamp , AM_Clamp , AM_Clamp > : : GetRHI ( ) ) ;
2014-03-14 14:13:41 -04:00
// PostprocessInput1MS and EditorPrimitivesStencil
{
FRenderingCompositeOutputRef * OutputRef = Context . Pass - > GetInput ( ePId_Input1 ) ;
check ( OutputRef ) ;
FRenderingCompositeOutput * Input = OutputRef - > GetOutput ( ) ;
check ( Input ) ;
TRefCountPtr < IPooledRenderTarget > InputPooledElement = Input - > RequestInput ( ) ;
check ( InputPooledElement ) ;
FTexture2DRHIRef & TargetableTexture = ( FTexture2DRHIRef & ) InputPooledElement - > GetRenderTargetItem ( ) . TargetableTexture ;
2014-06-12 07:13:34 -04:00
SetTextureParameter ( Context . RHICmdList , ShaderRHI , PostprocessInput1MS , TargetableTexture ) ;
2014-03-14 14:13:41 -04:00
2014-05-12 17:40:47 -04:00
if ( EditorPrimitivesStencil . IsBound ( ) )
2014-03-14 14:13:41 -04:00
{
2014-08-12 18:24:52 -04:00
// cache the stencil SRV to avoid create calls each frame (the cache element is stored in the state)
2014-03-14 14:13:41 -04:00
if ( ViewState - > SelectionOutlineCacheKey ! = TargetableTexture )
{
// release if not the right one (as the internally SRV stores a pointer to the texture we cannot get a false positive)
ViewState - > SelectionOutlineCacheKey . SafeRelease ( ) ;
ViewState - > SelectionOutlineCacheValue . SafeRelease ( ) ;
}
if ( ! ViewState - > SelectionOutlineCacheValue )
{
// create if needed
ViewState - > SelectionOutlineCacheKey = TargetableTexture ;
ViewState - > SelectionOutlineCacheValue = RHICreateShaderResourceView ( TargetableTexture , 0 , 1 , PF_X24_G8 ) ;
}
2014-06-12 07:13:34 -04:00
SetSRVParameter ( Context . RHICmdList , ShaderRHI , EditorPrimitivesStencil , ViewState - > SelectionOutlineCacheValue ) ;
2014-06-05 16:38:54 -04:00
}
2014-03-14 14:13:41 -04:00
}
# if WITH_EDITOR
{
2015-02-09 11:52:11 -05:00
FLinearColor OutlineColorValue = Context . View . SelectionOutlineColor ;
FLinearColor SubduedOutlineColorValue = Context . View . SubduedSelectionOutlineColor ;
OutlineColorValue . A = GEngine - > SelectionHighlightIntensity ;
2014-03-14 14:13:41 -04:00
2015-02-09 11:52:11 -05:00
SetShaderValue ( Context . RHICmdList , ShaderRHI , OutlineColor , OutlineColorValue ) ;
SetShaderValue ( Context . RHICmdList , ShaderRHI , SubduedOutlineColor , SubduedOutlineColorValue ) ;
2014-06-12 07:13:34 -04:00
SetShaderValue ( Context . RHICmdList , ShaderRHI , BSPSelectionIntensity , GEngine - > BSPSelectionHighlightIntensity ) ;
2014-03-14 14:13:41 -04:00
}
# else
check ( ! " This shader is not used outside of the Editor. " ) ;
# endif
{
static const auto CVar = IConsoleManager : : Get ( ) . FindTConsoleVariableDataFloat ( TEXT ( " r.Editor.MovingPattern " ) ) ;
FLinearColor Value ( 0 , CVar - > GetValueOnRenderThread ( ) , 0 , 0 ) ;
if ( ! ViewFamily . bRealtimeUpdate )
{
// no animation if realtime update is disabled
Value . G = 0 ;
}
2014-06-12 07:13:34 -04:00
SetShaderValue ( Context . RHICmdList , ShaderRHI , EditorRenderParams , Value ) ;
2014-03-14 14:13:41 -04:00
}
}
// FShader interface.
2015-04-01 07:20:55 -04:00
virtual bool Serialize ( FArchive & Ar ) override
2014-03-14 14:13:41 -04:00
{
bool bShaderHasOutdatedParameters = FGlobalShader : : Serialize ( Ar ) ;
2015-02-09 11:52:11 -05:00
Ar < < PostprocessParameter < < OutlineColor < < SubduedOutlineColor < < BSPSelectionIntensity < < DeferredParameters < < PostprocessInput1MS < < EditorPrimitivesStencil < < EditorRenderParams ;
2014-03-14 14:13:41 -04:00
return bShaderHasOutdatedParameters ;
}
static const TCHAR * GetSourceFilename ( )
{
return TEXT ( " PostProcessSelectionOutline " ) ;
}
static const TCHAR * GetFunctionName ( )
{
return TEXT ( " MainPS " ) ;
}
} ;
// #define avoids a lot of code duplication
# define VARIATION1(A) typedef FPostProcessSelectionOutlinePS<A> FPostProcessSelectionOutlinePS##A; \
IMPLEMENT_SHADER_TYPE2 ( FPostProcessSelectionOutlinePS # # A , SF_Pixel ) ;
VARIATION1 ( 1 ) VARIATION1 ( 2 ) VARIATION1 ( 4 ) VARIATION1 ( 8 )
# undef VARIATION1
template < uint32 MSAASampleCount >
2014-06-12 07:13:34 -04:00
static void SetSelectionOutlineShaderTempl ( const FRenderingCompositePassContext & Context )
2014-03-14 14:13:41 -04:00
{
2014-08-28 06:22:54 -04:00
TShaderMapRef < FPostProcessVS > VertexShader ( Context . GetShaderMap ( ) ) ;
TShaderMapRef < FPostProcessSelectionOutlinePS < MSAASampleCount > > PixelShader ( Context . GetShaderMap ( ) ) ;
2014-03-14 14:13:41 -04:00
static FGlobalBoundShaderState BoundShaderState ;
2014-06-27 11:07:13 -04:00
2014-03-14 14:13:41 -04:00
2014-08-19 10:41:34 -04:00
SetGlobalBoundShaderState ( Context . RHICmdList , Context . GetFeatureLevel ( ) , BoundShaderState , GFilterVertexDeclaration . VertexDeclarationRHI , * VertexShader , * PixelShader ) ;
2014-06-12 07:13:34 -04:00
PixelShader - > SetPS ( Context ) ;
2014-03-14 14:13:41 -04:00
}
void FRCPassPostProcessSelectionOutline : : Process ( FRenderingCompositePassContext & Context )
{
2014-10-20 10:43:43 -04:00
SCOPED_DRAW_EVENT ( Context . RHICmdList , PostProcessSelectionOutline ) ;
2014-03-14 14:13:41 -04:00
const FPooledRenderTargetDesc * SceneColorInputDesc = GetInputDesc ( ePId_Input0 ) ;
const FPooledRenderTargetDesc * SelectionColorInputDesc = GetInputDesc ( ePId_Input1 ) ;
if ( ! SceneColorInputDesc | | ! SelectionColorInputDesc )
{
// input is not hooked up correctly
return ;
}
const FSceneView & View = Context . View ;
FIntRect ViewRect = View . ViewRect ;
FIntPoint SrcSize = SceneColorInputDesc - > Extent ;
const FSceneRenderTargetItem & DestRenderTarget = PassOutputs [ 0 ] . RequestSurface ( Context ) ;
// Set the view family's render target/viewport.
2014-06-12 07:13:34 -04:00
SetRenderTarget ( Context . RHICmdList , DestRenderTarget . TargetableTexture , FTextureRHIRef ( ) ) ;
2015-03-31 14:02:45 -04:00
Context . RHICmdList . Clear ( true , FLinearColor : : Black , false , ( float ) ERHIZBuffer : : FarPlane , false , 0 , ViewRect ) ;
2014-03-14 14:13:41 -04:00
Context . SetViewportAndCallRHI ( ViewRect ) ;
// set the state
2014-06-12 07:13:34 -04:00
Context . RHICmdList . SetBlendState ( TStaticBlendState < > : : GetRHI ( ) ) ;
Context . RHICmdList . SetRasterizerState ( TStaticRasterizerState < > : : GetRHI ( ) ) ;
Context . RHICmdList . SetDepthStencilState ( TStaticDepthStencilState < false , CF_Always > : : GetRHI ( ) ) ;
2014-03-14 14:13:41 -04:00
const uint32 MSAASampleCount = GSceneRenderTargets . GetEditorMSAACompositingSampleCount ( ) ;
if ( MSAASampleCount = = 1 )
{
2014-06-12 07:13:34 -04:00
SetSelectionOutlineShaderTempl < 1 > ( Context ) ;
2014-03-14 14:13:41 -04:00
}
else if ( MSAASampleCount = = 2 )
{
2014-06-12 07:13:34 -04:00
SetSelectionOutlineShaderTempl < 2 > ( Context ) ;
2014-03-14 14:13:41 -04:00
}
else if ( MSAASampleCount = = 4 )
{
2014-06-12 07:13:34 -04:00
SetSelectionOutlineShaderTempl < 4 > ( Context ) ;
2014-03-14 14:13:41 -04:00
}
else if ( MSAASampleCount = = 8 )
{
2014-06-12 07:13:34 -04:00
SetSelectionOutlineShaderTempl < 8 > ( Context ) ;
2014-03-14 14:13:41 -04:00
}
else
{
// not supported, internal error
check ( 0 ) ;
}
// Draw a quad mapping scene color to the view's render target
2014-08-28 06:22:54 -04:00
TShaderMapRef < FPostProcessVS > VertexShader ( Context . GetShaderMap ( ) ) ;
2014-03-14 14:13:41 -04:00
DrawRectangle (
2014-06-12 07:13:34 -04:00
Context . RHICmdList ,
2014-03-14 14:13:41 -04:00
0 , 0 ,
ViewRect . Width ( ) , ViewRect . Height ( ) ,
ViewRect . Min . X , ViewRect . Min . Y ,
ViewRect . Width ( ) , ViewRect . Height ( ) ,
ViewRect . Size ( ) ,
SrcSize ,
2014-04-23 17:26:59 -04:00
* VertexShader ,
2014-03-14 14:13:41 -04:00
EDRF_UseTriangleOptimization ) ;
2014-06-12 07:13:34 -04:00
Context . RHICmdList . CopyToResolveTarget ( DestRenderTarget . TargetableTexture , DestRenderTarget . ShaderResourceTexture , false , FResolveParams ( ) ) ;
2014-03-14 14:13:41 -04:00
}
FPooledRenderTargetDesc FRCPassPostProcessSelectionOutline : : ComputeOutputDesc ( EPassOutputId InPassOutputId ) const
{
FPooledRenderTargetDesc Ret = PassInputs [ 0 ] . GetOutput ( ) - > RenderTargetDesc ;
Ret . DebugName = TEXT ( " SelectionComposited " ) ;
return Ret ;
}