Revert "Minor - Start Shadow Map - V10.5.0"

This reverts commit d6b7626446.
This commit is contained in:
2025-05-25 16:12:39 +02:00
parent d6b7626446
commit dbd27d1fe7
18 changed files with 531 additions and 1305 deletions

View File

@@ -43,8 +43,6 @@
#include <DirectXMath.h>
#include <mutex>
#include "shadow_map.h"
/////////////
// GLOBALS //
@@ -187,17 +185,8 @@ private:
bool render_scene_to_texture(float);
bool render_refraction_to_texture();
bool render_reflection_to_texture();
bool render_pass(
const std::vector<std::reference_wrapper<std::vector<object*>>>& RenderQueues,
XMFLOAT4* diffuse,
XMFLOAT4* position,
XMFLOAT4* ambient,
XMMATRIX view,
XMMATRIX projection
);
bool create_shadow_map(
const std::vector<std::reference_wrapper<std::vector<object*>>>& RenderQueues
);
bool render_pass(const std::vector<std::reference_wrapper<std::vector<object*>>>& RenderQueues, XMFLOAT4* diffuse, XMFLOAT4* position, XMFLOAT4* ambient, XMMATRIX view, XMMATRIX projection);
void update_skybox_position();
public :
@@ -331,18 +320,6 @@ private :
// ------------------------------------------------- //
input inputs_;
// ------------------------------------------------- //
// -------------------- Shadows -------------------- //
// ------------------------------------------------- //
shadow_map* shadow_map_;
camera_class* light_camera_;
XMFLOAT4 light_position_buffer_;
XMFLOAT3 light_rotation_buffer_;
XMMATRIX light_view_matrix_;
XMMATRIX light_projection_matrix_;
ID3D11ShaderResourceView* shadow_srv_;
};
#endif

View File

@@ -1,33 +0,0 @@
#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_;
};