Patch - Sun camera Depth experiment - V10.5.3
This commit is contained in:
56
enginecustom/src/inc/shader/depth_shader_class.h
Normal file
56
enginecustom/src/inc/shader/depth_shader_class.h
Normal file
@@ -0,0 +1,56 @@
|
||||
#ifndef _DEPTH_SHADER_CLASS_H_
|
||||
#define _DEPTH_SHADER_CLASS_H_
|
||||
|
||||
|
||||
//////////////
|
||||
// INCLUDES //
|
||||
//////////////
|
||||
#include "Logger.h"
|
||||
#include <d3d11.h>
|
||||
#include <d3dcompiler.h>
|
||||
#include <directxmath.h>
|
||||
#include <fstream>
|
||||
using namespace DirectX;
|
||||
using namespace std;
|
||||
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// Class name: depth_shader_class
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
class depth_shader_class
|
||||
{
|
||||
private:
|
||||
struct matrix_buffer_type
|
||||
{
|
||||
XMMATRIX world;
|
||||
XMMATRIX view;
|
||||
XMMATRIX projection;
|
||||
};
|
||||
|
||||
public:
|
||||
depth_shader_class();
|
||||
depth_shader_class(const depth_shader_class&);
|
||||
~depth_shader_class();
|
||||
|
||||
bool initialize(ID3D11Device*, HWND);
|
||||
void shutdown();
|
||||
bool render(ID3D11DeviceContext*, int, XMMATRIX, XMMATRIX, XMMATRIX, ID3D11ShaderResourceView*);
|
||||
|
||||
private:
|
||||
bool initialize_shader(ID3D11Device*, HWND, WCHAR*, WCHAR*);
|
||||
void shutdown_shader();
|
||||
void output_shader_error_message(ID3D10Blob*, HWND, WCHAR*);
|
||||
|
||||
bool set_shader_parameters(ID3D11DeviceContext*, XMMATRIX, XMMATRIX, XMMATRIX, ID3D11ShaderResourceView*);
|
||||
void render_shader(ID3D11DeviceContext*, int);
|
||||
|
||||
private:
|
||||
ID3D11VertexShader* vertex_shader_;
|
||||
ID3D11PixelShader* pixel_shader_;
|
||||
ID3D11InputLayout* layout_;
|
||||
ID3D11Buffer* matrix_buffer_;
|
||||
ID3D11SamplerState* sample_state_;
|
||||
|
||||
};
|
||||
|
||||
#endif
|
@@ -17,8 +17,10 @@
|
||||
#include "refraction_shader_class.h"
|
||||
#include "water_shader_class.h"
|
||||
#include "celshade_class.h"
|
||||
#include "depth_shader_class.h"
|
||||
#include "skybox_shader_class.h"
|
||||
#include "sunlight_shader_class.h"
|
||||
#include "depth_shader_class.h"
|
||||
|
||||
using namespace DirectX;
|
||||
|
||||
@@ -46,6 +48,14 @@ public:
|
||||
bool render_cel_shading_shader(ID3D11DeviceContext*, int, XMMATRIX, XMMATRIX, XMMATRIX, ID3D11ShaderResourceView*, XMFLOAT4, XMFLOAT4, XMFLOAT3, float);
|
||||
bool render_sunlight_shader(ID3D11DeviceContext*, int, XMMATRIX, XMMATRIX, XMMATRIX, ID3D11ShaderResourceView*, XMFLOAT4, XMFLOAT4, XMFLOAT3, float);
|
||||
bool render_skybox_shader(ID3D11DeviceContext*, int, XMMATRIX, XMMATRIX, XMMATRIX, ID3D11ShaderResourceView*, XMFLOAT4, XMFLOAT4, XMFLOAT3, float);
|
||||
bool render_depth_shader(
|
||||
ID3D11DeviceContext* context,
|
||||
int indexCount,
|
||||
XMMATRIX worldMatrix,
|
||||
XMMATRIX viewMatrix,
|
||||
XMMATRIX projectionMatrix,
|
||||
ID3D11ShaderResourceView* texture
|
||||
);
|
||||
|
||||
private:
|
||||
texture_shader_class* texture_shader_;
|
||||
@@ -62,6 +72,7 @@ private:
|
||||
celshade_class* cel_shading_shader_;
|
||||
sunlight_shader_class* sunlight_shader_;
|
||||
skybox_shader_class* skybox_shader_;
|
||||
depth_shader_class* depth_shader_;
|
||||
};
|
||||
|
||||
#endif
|
Reference in New Issue
Block a user