-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathLightShaderClass.hpp
71 lines (49 loc) · 1.49 KB
/
LightShaderClass.hpp
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
67
68
69
70
71
#ifndef LIGHTSHADERCLASS_HPP
#define LIGHTSHADERCLASS_HPP
#include <d3d11.h>
#include <d3dcompiler.h>
#include "DeferredBuffersClass.hpp" // BUFFER_COUNT, SetShadersAndShaderResources
class LightShaderClass {
private:
ID3D11VertexShader* VertexShader;
ID3D11PixelShader* PixelShader;
ID3D11SamplerState* SamplerStateCLAMP;
ID3D11RenderTargetView* BackBufferRTV;
public:
LightShaderClass();
~LightShaderClass();
ID3D11RenderTargetView* *GetBackBufferRTV();
/* ------------- COMMENTS -------------
Initializes internal shaders.
Initializes internal sampler.
Initializes internal screenquad.
*/
void InitializeAll(ID3D11Device* *Device);
/* ------------- COMMENTS -------------
Removes input layout and vertexBuffers, this function draws
the screen through an id-generated quad in the VertexShader which gets
input from the earlier rendered G-Buffers.
*/
void Render(
ID3D11DeviceContext* *DeviceContext
);
void InitializeShaders(ID3D11Device* *Device);
void InitializeSampler(ID3D11Device* *Device);
/* ------------- COMMENTS -------------
*/
void SetRenderTargets(
ID3D11DeviceContext* *DeviceContext,
ID3D11RenderTargetView* *BackBufferRTV,
ID3D11DepthStencilView* *DepthStencilView
);
/* ------------- COMMENTS -------------
Sets internal VertexLayout to the GPU-pipeline.
Sets internal Shaders to the GPU-pipeline.
Sets internal SamplerState to the GPU-pipeline
*/
void SetPipeline(
ID3D11DeviceContext* *DeviceContext
);
void ReleaseAll();
};
#endif