-
Notifications
You must be signed in to change notification settings - Fork 7
/
SVGFPass.h
66 lines (51 loc) · 2 KB
/
SVGFPass.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
#pragma once
#include "Falcor.h"
class SVGFPass
{
public:
SVGFPass(uint32_t width, uint32_t height);
~SVGFPass();
Falcor::Texture::SharedPtr Execute(
Falcor::RenderContext* renderContext,
Falcor::Texture::SharedPtr inputSignal,
Falcor::Texture::SharedPtr motionVec,
Falcor::Texture::SharedPtr linearZ,
Falcor::Texture::SharedPtr normalDepth);
void RenderGui(Falcor::Gui* gui);
private:
void TemporalReprojection(Falcor::RenderContext* renderContext);
void SpatialVarianceEstimation(Falcor::RenderContext* renderContext);
void AtrousFilter(Falcor::RenderContext* renderContext, uint32_t iteration, Falcor::Fbo::SharedPtr input, Falcor::Fbo::SharedPtr output);
Falcor::FullScreenPass::UniquePtr mReprojectionPass;
Falcor::GraphicsVars::SharedPtr mReprojectionVars;
Falcor::GraphicsState::SharedPtr mReprojectionState;
Falcor::FullScreenPass::UniquePtr mVarianceEstimationPass;
Falcor::GraphicsVars::SharedPtr mVarianceEstimationVars;
Falcor::GraphicsState::SharedPtr mVarianceEstimationState;
Falcor::FullScreenPass::UniquePtr mAtrousPass;
Falcor::GraphicsVars::SharedPtr mAtrousVars;
Falcor::GraphicsState::SharedPtr mAtrousState;
Falcor::Fbo::SharedPtr mAtrousPingFbo;
Falcor::Fbo::SharedPtr mAtrousPongFbo;
Falcor::Fbo::SharedPtr mLastFilteredFbo;
Falcor::Fbo::SharedPtr mCurrReprojFbo;
Falcor::Fbo::SharedPtr mPrevReprojFbo;
Falcor::Fbo::SharedPtr mOutputFbo;
Falcor::Texture::SharedPtr mPrevLinearZTexture;
uint32_t mAtrousIterations;
uint32_t mFeedbackTap;
uint32_t mAtrousRadius;
float mAlpha;
float mMomentsAlpha;
float mPhiColor;
float mPhiNormal;
bool mEnableTemporalReprojection;
bool mEnableSpatialVarianceEstimation;
struct
{
Falcor::Texture::SharedPtr inputSignal;
Falcor::Texture::SharedPtr linearZ;
Falcor::Texture::SharedPtr motionVec;
Falcor::Texture::SharedPtr compactNormalDepth;
} mGBufferInput;
};