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
|
|
|
|
|
|
|
|
/*=============================================================================
|
|
|
|
|
PostProcessSubsurface.h: Screenspace subsurface scattering implementation
|
|
|
|
|
=============================================================================*/
|
|
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
|
|
#include "RenderingCompositionGraph.h"
|
|
|
|
|
|
2014-10-15 16:18:43 -04:00
|
|
|
// ePId_Input0: SceneColor
|
|
|
|
|
// derives from TRenderingCompositePassBase<InputCount, OutputCount>
|
|
|
|
|
// uses some GBuffer attributes
|
|
|
|
|
// alpha is unused
|
|
|
|
|
class FRCPassPostProcessSubsurfaceVisualize : public TRenderingCompositePassBase<1, 1>
|
|
|
|
|
{
|
|
|
|
|
public:
|
|
|
|
|
FRCPassPostProcessSubsurfaceVisualize();
|
|
|
|
|
|
|
|
|
|
// interface FRenderingCompositePass ---------
|
2015-04-01 07:20:55 -04:00
|
|
|
virtual void Process(FRenderingCompositePassContext& Context) override;
|
|
|
|
|
virtual FPooledRenderTargetDesc ComputeOutputDesc(EPassOutputId InPassOutputId) const override;
|
2014-10-15 16:18:43 -04:00
|
|
|
virtual void Release() override { delete this; }
|
|
|
|
|
};
|
2014-03-14 14:13:41 -04:00
|
|
|
|
|
|
|
|
// ePId_Input0: SceneColor
|
|
|
|
|
// derives from TRenderingCompositePassBase<InputCount, OutputCount>
|
|
|
|
|
// uses some GBuffer attributes
|
2014-10-23 13:36:07 -04:00
|
|
|
class FRCPassPostProcessSubsurfaceExtractSpecular : public TRenderingCompositePassBase<1, 1>
|
2014-03-14 14:13:41 -04:00
|
|
|
{
|
|
|
|
|
public:
|
|
|
|
|
// interface FRenderingCompositePass ---------
|
2015-04-01 07:20:55 -04:00
|
|
|
virtual void Process(FRenderingCompositePassContext& Context) override;
|
|
|
|
|
virtual FPooledRenderTargetDesc ComputeOutputDesc(EPassOutputId InPassOutputId) const override;
|
2014-06-13 06:14:46 -04:00
|
|
|
virtual void Release() override { delete this; }
|
2014-03-14 14:13:41 -04:00
|
|
|
};
|
|
|
|
|
|
2014-10-23 13:36:07 -04:00
|
|
|
// ePId_Input0: SceneColor
|
|
|
|
|
// derives from TRenderingCompositePassBase<InputCount, OutputCount>
|
|
|
|
|
// uses some GBuffer attributes
|
|
|
|
|
// alpha is unused
|
|
|
|
|
class FRCPassPostProcessSubsurfaceSetup : public TRenderingCompositePassBase<1, 1>
|
|
|
|
|
{
|
|
|
|
|
public:
|
|
|
|
|
// constructor
|
|
|
|
|
FRCPassPostProcessSubsurfaceSetup(FViewInfo& View);
|
|
|
|
|
|
|
|
|
|
// interface FRenderingCompositePass ---------
|
2015-04-01 07:20:55 -04:00
|
|
|
virtual void Process(FRenderingCompositePassContext& Context) override;
|
|
|
|
|
virtual FPooledRenderTargetDesc ComputeOutputDesc(EPassOutputId InPassOutputId) const override;
|
2014-10-23 13:36:07 -04:00
|
|
|
virtual void Release() override { delete this; }
|
|
|
|
|
|
|
|
|
|
FIntRect ViewRect;
|
|
|
|
|
};
|
|
|
|
|
|
2014-03-14 14:13:41 -04:00
|
|
|
|
|
|
|
|
// derives from TRenderingCompositePassBase<InputCount, OutputCount>
|
2014-10-02 17:19:02 -04:00
|
|
|
// ePId_Input0: SceneColor (horizontal blur) or the pass before (vertical blur)
|
2014-12-10 18:28:58 -05:00
|
|
|
// ePId_Input1: optional Setup pass (only for InDirection==1)
|
2014-03-14 14:13:41 -04:00
|
|
|
// modifies SceneColor, uses some GBuffer attributes
|
2014-12-10 18:28:58 -05:00
|
|
|
class FRCPassPostProcessSubsurface : public TRenderingCompositePassBase<2, 1>
|
2014-03-14 14:13:41 -04:00
|
|
|
{
|
|
|
|
|
public:
|
|
|
|
|
// constructor
|
2014-10-02 17:19:02 -04:00
|
|
|
// @param InDirection 0:horizontal/1:vertical
|
2014-10-15 16:18:43 -04:00
|
|
|
FRCPassPostProcessSubsurface(uint32 InDirection);
|
2014-03-14 14:13:41 -04:00
|
|
|
|
|
|
|
|
// 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:
|
2014-09-05 14:46:36 -04:00
|
|
|
// 0:horizontal/1:vertical
|
2014-10-02 17:19:02 -04:00
|
|
|
uint32 Direction;
|
2014-03-14 14:13:41 -04:00
|
|
|
};
|
2014-10-02 17:19:02 -04:00
|
|
|
|
|
|
|
|
|
|
|
|
|
// derives from TRenderingCompositePassBase<InputCount, OutputCount>
|
|
|
|
|
// ePId_Input0: output from FRCPassPostProcessSubsurface
|
|
|
|
|
// ePId_Input1: SceneColor before Screen Space Subsurface input
|
|
|
|
|
// modifies SceneColor, uses some GBuffer attributes
|
|
|
|
|
class FRCPassPostProcessSubsurfaceRecombine : public TRenderingCompositePassBase<2, 1>
|
|
|
|
|
{
|
|
|
|
|
public:
|
|
|
|
|
// interface FRenderingCompositePass ---------
|
|
|
|
|
|
2015-04-01 07:20:55 -04:00
|
|
|
virtual void Process(FRenderingCompositePassContext& Context) override;
|
2014-10-02 17:19:02 -04:00
|
|
|
virtual void Release() override { delete this; }
|
2015-04-01 07:20:55 -04:00
|
|
|
virtual FPooledRenderTargetDesc ComputeOutputDesc(EPassOutputId InPassOutputId) const override;
|
|
|
|
|
};
|