Patch Update - Skybox Shader wip - V9.3.2
This commit is contained in:
@@ -1,14 +1,68 @@
|
||||
#pragma once
|
||||
|
||||
#include "Logger.h"
|
||||
#include <d3d11.h>
|
||||
#include <d3dcompiler.h>
|
||||
#include <directxmath.h>
|
||||
|
||||
#include <fstream>
|
||||
using namespace DirectX;
|
||||
using namespace std;
|
||||
|
||||
class SkyboxShaderClass
|
||||
{
|
||||
public:
|
||||
|
||||
};
|
||||
|
||||
private :
|
||||
struct MatrixBufferType
|
||||
{
|
||||
XMMATRIX world;
|
||||
XMMATRIX view;
|
||||
XMMATRIX projection;
|
||||
};
|
||||
|
||||
struct CameraBufferType
|
||||
{
|
||||
XMFLOAT3 cameraPosition;
|
||||
float padding;
|
||||
};
|
||||
|
||||
struct SunLightBufferType
|
||||
{
|
||||
XMFLOAT4 diffuseColor;
|
||||
XMFLOAT4 ambientColor;
|
||||
XMFLOAT3 sunDirection;
|
||||
float intensity;
|
||||
};
|
||||
|
||||
struct SunLightColorBufferType
|
||||
{
|
||||
XMFLOAT4 sunColor;
|
||||
};
|
||||
|
||||
public :
|
||||
SkyboxShaderClass();
|
||||
SkyboxShaderClass(const SkyboxShaderClass&);
|
||||
~SkyboxShaderClass();
|
||||
|
||||
bool Initialize(ID3D11Device*, HWND);
|
||||
void Shutdown();
|
||||
bool Render(ID3D11DeviceContext*, int, XMMATRIX, XMMATRIX, XMMATRIX, ID3D11ShaderResourceView*, XMFLOAT4, XMFLOAT4, XMFLOAT3,float);
|
||||
|
||||
private:
|
||||
bool InitializeShader(ID3D11Device*, HWND, WCHAR*, WCHAR*);
|
||||
void ShutdownShader();
|
||||
void OutputShaderErrorMessage(ID3D10Blob*, HWND, WCHAR*);
|
||||
|
||||
bool SetShaderParameters(ID3D11DeviceContext*, XMMATRIX, XMMATRIX, XMMATRIX, ID3D11ShaderResourceView*, XMFLOAT4, XMFLOAT4, XMFLOAT3, float);
|
||||
void RenderShader(ID3D11DeviceContext*, int);
|
||||
|
||||
private:
|
||||
ID3D11VertexShader* m_vertexShader;
|
||||
ID3D11PixelShader* m_pixelShader;
|
||||
ID3D11InputLayout* m_layout;
|
||||
ID3D11SamplerState* m_sampleState;
|
||||
ID3D11Buffer* m_matrixBuffer;
|
||||
ID3D11Buffer* m_cameraBuffer;
|
||||
ID3D11Buffer* m_sunlightBuffer;
|
||||
ID3D11Buffer* m_sunlightColorBuffer;
|
||||
ID3D11Buffer* m_sunlightPositionBuffer;
|
||||
};
|
@@ -45,20 +45,20 @@ public:
|
||||
bool RenderWaterShader(ID3D11DeviceContext*, int, XMMATRIX, XMMATRIX, XMMATRIX, XMMATRIX, ID3D11ShaderResourceView*, ID3D11ShaderResourceView*, ID3D11ShaderResourceView*, float, float);
|
||||
bool RenderCelShadingShader(ID3D11DeviceContext*, int, XMMATRIX, XMMATRIX, XMMATRIX, ID3D11ShaderResourceView*, XMFLOAT4, XMFLOAT4, XMFLOAT3, float);
|
||||
bool RenderSunlightShader(ID3D11DeviceContext*, int, XMMATRIX, XMMATRIX, XMMATRIX, ID3D11ShaderResourceView*, XMFLOAT4, XMFLOAT4, XMFLOAT3, float);
|
||||
bool RenderSkyboxShader(
|
||||
ID3D11DeviceContext* deviceContext,
|
||||
int indexCount,
|
||||
XMMATRIX worldMatrix,
|
||||
XMMATRIX viewMatrix,
|
||||
XMMATRIX projectionMatrix,
|
||||
ID3D11ShaderResourceView* front,
|
||||
ID3D11ShaderResourceView* back,
|
||||
ID3D11ShaderResourceView* left,
|
||||
ID3D11ShaderResourceView* right,
|
||||
ID3D11ShaderResourceView* top,
|
||||
ID3D11ShaderResourceView* bottom,
|
||||
XMFLOAT4 sunDiffuseColor
|
||||
);
|
||||
bool RenderSkyboxShader(ID3D11DeviceContext*, int, XMMATRIX, XMMATRIX, XMMATRIX, ID3D11ShaderResourceView*, XMFLOAT4, XMFLOAT4, XMFLOAT3, float);
|
||||
// ID3D11DeviceContext* deviceContext,
|
||||
// int indexCount,
|
||||
// XMMATRIX worldMatrix,
|
||||
// XMMATRIX viewMatrix,
|
||||
// XMMATRIX projectionMatrix,
|
||||
// ID3D11ShaderResourceView* front,
|
||||
// ID3D11ShaderResourceView* back,
|
||||
// ID3D11ShaderResourceView* left,
|
||||
// ID3D11ShaderResourceView* right,
|
||||
// ID3D11ShaderResourceView* top,
|
||||
// ID3D11ShaderResourceView* bottom,
|
||||
// XMFLOAT4 sunDiffuseColor
|
||||
// );
|
||||
|
||||
private:
|
||||
TextureShaderClass* m_TextureShader;
|
||||
|
Reference in New Issue
Block a user