blob: 5b8c9757c7f154ad52aef555a114cfb74b3e9249 (
plain)
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 "PassElement.hpp"
#include <optional>
class CWLSurfaceResource;
class ITexture;
class CSyncTimeline;
enum eDiscardMode : uint8_t {
DISCARD_OPAQUE = 1,
DISCARD_ALPHA = 1 << 1
};
class CTexPassElement : public IPassElement {
public:
struct SRenderData {
SP<ITexture> tex;
CBox box;
float a = 1.F;
float blurA = 1.F;
float overallA = 1.F;
CRegion damage;
int round = 0;
float roundingPower = 2.0f;
bool flipEndFrame = false;
bool useMirrorProjection = false;
CBox clipBox;
bool blur = false;
std::optional<float> ignoreAlpha;
std::optional<bool> blockBlurOptimization;
bool cmBackToSRGB = false;
SP<CMonitor> cmBackToSRGBSource;
bool discardActive = false;
bool allowCustomUV = false;
SP<CWLSurfaceResource> surface = nullptr;
uint32_t discardMode = DISCARD_OPAQUE;
float discardOpacity = 0.f;
CRegion clipRegion;
PHLLSREF currentLS;
SP<ITexture> blurredBG;
};
CTexPassElement(const SRenderData& data);
CTexPassElement(SRenderData&& data);
virtual ~CTexPassElement() = default;
virtual bool needsLiveBlur();
virtual bool needsPrecomputeBlur();
virtual std::optional<CBox> boundingBox();
virtual CRegion opaqueRegion();
virtual void discard();
virtual const char* passName() {
return "CTexPassElement";
}
virtual ePassElementType type() {
return EK_TEXTURE;
};
SRenderData m_data;
};
|