Patch - Deth Shader integration for shadow map - V10.6.1
This commit is contained in:
@@ -43,6 +43,8 @@
|
||||
#include <DirectXMath.h>
|
||||
#include <mutex>
|
||||
|
||||
#include "shadow_map.h"
|
||||
|
||||
|
||||
/////////////
|
||||
// GLOBALS //
|
||||
@@ -236,6 +238,9 @@ private :
|
||||
position_class* position_;
|
||||
int drawcalls_;
|
||||
|
||||
shadow_map* shadow_map_;
|
||||
ID3D11ShaderResourceView* shadow_map_srv_;
|
||||
|
||||
// ------------------------------------ //
|
||||
// ------------- OBJECTS -------------- //
|
||||
// ------------------------------------ //
|
||||
@@ -258,7 +263,6 @@ private :
|
||||
std::vector<light_class*> lights_;
|
||||
int num_lights_;
|
||||
light_class* sun_light_;
|
||||
|
||||
XMFLOAT3 true_light_position_;
|
||||
model_class* light_model_;
|
||||
|
||||
@@ -270,7 +274,6 @@ private :
|
||||
font_shader_class* font_shader_;
|
||||
bitmap_class* bitmap_;
|
||||
sprite_class* sprite_;
|
||||
|
||||
bool enable_cel_shading_;
|
||||
|
||||
// ----------------------------------- //
|
||||
|
23
enginecustom/src/inc/system/shadow_map.h
Normal file
23
enginecustom/src/inc/system/shadow_map.h
Normal file
@@ -0,0 +1,23 @@
|
||||
#pragma once
|
||||
#include <d3d11.h>
|
||||
#include <directxmath.h>
|
||||
|
||||
class shadow_map {
|
||||
public:
|
||||
shadow_map();
|
||||
~shadow_map();
|
||||
|
||||
bool initialize(ID3D11Device* device, int width, int height);
|
||||
void shutdown();
|
||||
|
||||
void set_render_target(ID3D11DeviceContext* context);
|
||||
void clear_render_target(ID3D11DeviceContext* context, float depth = 1.0f);
|
||||
|
||||
ID3D11ShaderResourceView* get_shader_resource_view();
|
||||
|
||||
private:
|
||||
ID3D11Texture2D* depth_texture_;
|
||||
ID3D11DepthStencilView* depth_stencil_view_;
|
||||
ID3D11ShaderResourceView* shader_resource_view_;
|
||||
int width_, height_;
|
||||
};
|
Reference in New Issue
Block a user