-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathTAA.h
30 lines (25 loc) · 838 Bytes
/
TAA.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
#pragma once
#include "Falcor.h"
class TAA
{
public:
Falcor::TemporalAA::SharedPtr pTAA;
Falcor::Fbo::SharedPtr getActiveFbo() { return pTAAFbos[activeFboIndex]; }
Falcor::Fbo::SharedPtr getInactiveFbo() { return pTAAFbos[1 - activeFboIndex]; }
void createFbos(uint32_t width, uint32_t height, const Falcor::Fbo::Desc & fboDesc)
{
pTAAFbos[0] = Falcor::FboHelper::create2D(width, height, fboDesc);
pTAAFbos[1] = Falcor::FboHelper::create2D(width, height, fboDesc);
}
void switchFbos() { activeFboIndex = 1 - activeFboIndex; }
void resetFbos()
{
activeFboIndex = 0;
pTAAFbos[0] = nullptr;
pTAAFbos[1] = nullptr;
}
void resetFboActiveIndex() { activeFboIndex = 0;}
private:
Falcor::Fbo::SharedPtr pTAAFbos[2];
uint32_t activeFboIndex = 0;
};