Minor - Start Shadow Map - V10.5.0

This commit is contained in:
2025-05-22 17:28:29 +02:00
parent f9d4523f09
commit d6b7626446
18 changed files with 1305 additions and 531 deletions

View File

@@ -0,0 +1,33 @@
#pragma once
#include <d3d11.h>
class shadow_map
{
public:
shadow_map();
shadow_map(const shadow_map&) = delete;
shadow_map& operator=(const shadow_map&) = delete;
~shadow_map();
bool initialize(
ID3D11Device* device,
int shadow_map_width,
int shadow_map_height
);
void set_render_target(ID3D11DeviceContext* context);
void clear_render_target(ID3D11DeviceContext* context, float depth);
ID3D11ShaderResourceView* get_shader_resource_view() const;
void shutdown();
private:
ID3D11Texture2D* depth_texture_;
ID3D11DepthStencilView* depth_stencil_view_;
ID3D11ShaderResourceView* shader_resource_view_;
D3D11_VIEWPORT viewport_;
};