Add shadows, fi other stuff

This commit is contained in:
2025-01-17 18:13:36 +01:00
parent 12cbbb4dcb
commit f413bf886b
37 changed files with 6379 additions and 31 deletions

View File

@@ -0,0 +1,37 @@
#ifndef GP1_DIRECTX_SHADOWMAPBUFFER_H
#define GP1_DIRECTX_SHADOWMAPBUFFER_H
#include <d3d11.h>
#include <DirectXMath.h>
#include "DepthBuffer.h"
#include "SamplerState.h"
class ShadowMapBuffer {
public:
ShadowMapBuffer(ID3D11Device *device, UINT width, UINT height);
~ShadowMapBuffer();
bool Initialize();
void SetRenderTarget(ID3D11DeviceContext *deviceContext);
void ResetRenderTarget(ID3D11DeviceContext *deviceContext);
ID3D11ShaderResourceView *GetShaderResourceView() const { return m_shaderResourceView; }
ID3D11SamplerState *GetSamplerState() const { return m_samplerState.GetSamplerState(); }
ID3D11DepthStencilView *GetDepthStencilView();
private:
ID3D11Device *m_device;
UINT m_width;
UINT m_height;
DepthBuffer m_depthBuffer;
SamplerState m_samplerState;
ID3D11ShaderResourceView *m_shaderResourceView;
};
#endif //GP1_DIRECTX_SHADOWMAPBUFFER_H