-
Notifications
You must be signed in to change notification settings - Fork 0
/
depthShaderClass.h
40 lines (30 loc) · 933 Bytes
/
depthShaderClass.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
#pragma once
class depthShaderClass {
private:
struct depthMatrixBufferType
{
XMMATRIX LVP;
};
struct LightBufferType
{
XMFLOAT4 diffuseColor;
XMFLOAT3 lightDirection;
float padding;
};
public:
bool Initialize(ID3D11Device*, HWND);
bool depthRender(ID3D11DeviceContext*, int, XMMATRIX, ID3D11ShaderResourceView*);
void Shutdown();
private:
bool InitializDeptheShader(ID3D11Device*, HWND, WCHAR*, WCHAR*); bool SetDepthShaderParameters(ID3D11DeviceContext*, XMMATRIX, ID3D11ShaderResourceView*);
void RenderDepthShader(ID3D11DeviceContext*, int);
void ShutdownShader();
void OutputShaderErrorMessage(ID3D10Blob*, HWND, WCHAR*);
private:
ID3D11VertexShader* m_depthShader_VS = nullptr;
ID3D11PixelShader* m_depthShader_PS = nullptr;
ID3D11InputLayout* m_layout = nullptr;
ID3D11SamplerState* m_sampleState = nullptr;
ID3D11Buffer* m_matrixBuffer = nullptr;
ID3D11Buffer* m_lightBuffer = nullptr;
};