-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathPostProcessSharp.h
36 lines (33 loc) · 948 Bytes
/
PostProcessSharp.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
#pragma once
#include "PostProcessBase.h"
class PostProcessSharp :
public PostProcessBase
{
struct SLight {
glm::vec3 color;
float intensity;
SLight() {
color = glm::vec3(1.0f);
intensity = 1.0f;
}
};
static const int LIGHT_COUNT = 10;
public:
PostProcessSharp() = default;
~PostProcessSharp() = default;
virtual void loadProgram(SampleCallbacks* pSample, RenderContext* pContext, Gui* pGui)override;
protected:
virtual void execute()override;
virtual void gui()override;
private:
ShaderPass pSharp;
ShaderVar vSharp;
float mdSharpContrast;
vec2 mdSharpSaturation;
bool mdCountPixelShaderInvocations = false;
int32_t mSharpLightNum;
std::vector<SLight> mdSharpLight;
TypedBuffer<float>::SharedPtr mpSharpSaturationBuffer;
StructuredBuffer::SharedPtr mpSharpLightBuffer;
Buffer::SharedPtr mpInvocationsBuffer;
};