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
|
|
|
|
|
|
|
|
/*=============================================================================
|
|
|
|
|
ScreenSpaceReflections.h: Post processing Screen Space Reflections implementation.
|
|
|
|
|
=============================================================================*/
|
|
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
|
|
#include "RenderingCompositionGraph.h"
|
|
|
|
|
|
|
|
|
|
// derives from TRenderingCompositePassBase<InputCount, OutputCount>
|
|
|
|
|
class FRCPassPostProcessDepthDownSample : public TRenderingCompositePassBase<1, 1>
|
|
|
|
|
{
|
|
|
|
|
public:
|
|
|
|
|
// interface FRenderingCompositePass ---------
|
2015-04-01 07:20:55 -04:00
|
|
|
virtual void Process(FRenderingCompositePassContext& Context) override;
|
2014-06-13 06:14:46 -04:00
|
|
|
virtual void Release() override { delete this; }
|
2015-04-01 07:20:55 -04:00
|
|
|
virtual FPooledRenderTargetDesc ComputeOutputDesc(EPassOutputId InPassOutputId) const override;
|
2014-03-14 14:13:41 -04:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
// ePId_Input0: half res scene color
|
|
|
|
|
// ePId_Input1: half res scene depth
|
|
|
|
|
// derives from TRenderingCompositePassBase<InputCount, OutputCount>
|
|
|
|
|
class FRCPassPostProcessScreenSpaceReflections : public TRenderingCompositePassBase<2, 1>
|
|
|
|
|
{
|
|
|
|
|
public:
|
|
|
|
|
FRCPassPostProcessScreenSpaceReflections( bool InPrevFrame )
|
|
|
|
|
: bPrevFrame( InPrevFrame )
|
|
|
|
|
{}
|
|
|
|
|
|
|
|
|
|
// interface FRenderingCompositePass ---------
|
2015-04-01 07:20:55 -04:00
|
|
|
virtual void Process(FRenderingCompositePassContext& Context) override;
|
2014-06-13 06:14:46 -04:00
|
|
|
virtual void Release() override { delete this; }
|
2015-04-01 07:20:55 -04:00
|
|
|
virtual FPooledRenderTargetDesc ComputeOutputDesc(EPassOutputId InPassOutputId) const override;
|
2014-03-14 14:13:41 -04:00
|
|
|
|
|
|
|
|
private:
|
|
|
|
|
bool bPrevFrame;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// ePId_Input0: half res scene color
|
|
|
|
|
// derives from TRenderingCompositePassBase<InputCount, OutputCount>
|
|
|
|
|
class FRCPassPostProcessApplyScreenSpaceReflections : public TRenderingCompositePassBase<2, 1>
|
|
|
|
|
{
|
|
|
|
|
public:
|
|
|
|
|
// interface FRenderingCompositePass ---------
|
2015-04-01 07:20:55 -04:00
|
|
|
virtual void Process(FRenderingCompositePassContext& Context) override;
|
2014-06-13 06:14:46 -04:00
|
|
|
virtual void Release() override { delete this; }
|
2015-04-01 07:20:55 -04:00
|
|
|
virtual FPooledRenderTargetDesc ComputeOutputDesc(EPassOutputId InPassOutputId) const override;
|
2014-03-14 14:13:41 -04:00
|
|
|
};
|
|
|
|
|
|
2014-08-12 18:24:52 -04:00
|
|
|
void ScreenSpaceReflections(FRHICommandListImmediate& RHICmdList, FViewInfo& View, TRefCountPtr<IPooledRenderTarget>& SSROutput);
|
2014-03-14 14:13:41 -04:00
|
|
|
|
|
|
|
|
bool DoScreenSpaceReflections(const FViewInfo& View);
|