Minor update - Sunlight shader
This commit is contained in:
@@ -27,12 +27,10 @@ private :
|
||||
|
||||
struct SunLightBufferType
|
||||
{
|
||||
XMFLOAT4 ambientColor;
|
||||
XMFLOAT4 diffuseColor;
|
||||
XMFLOAT3 lightDirection;
|
||||
float padding; // Added extra padding so structure is a multiple of 16 for CreateBuffer function requirements.
|
||||
float specularPower;
|
||||
XMFLOAT4 specularColor;
|
||||
XMFLOAT4 ambientColor;
|
||||
XMFLOAT3 sunDirection;
|
||||
float padding; // Ajoutez un padding pour aligner la structure sur 16 octets
|
||||
};
|
||||
|
||||
struct SunLightColorBufferType
|
||||
@@ -40,11 +38,6 @@ private :
|
||||
XMFLOAT4 sunColor;
|
||||
};
|
||||
|
||||
struct SunLightPositionBufferType
|
||||
{
|
||||
XMFLOAT4 sunPosition;
|
||||
};
|
||||
|
||||
public :
|
||||
SunlightShaderClass();
|
||||
SunlightShaderClass(const SunlightShaderClass&);
|
||||
@@ -52,14 +45,14 @@ public :
|
||||
|
||||
bool Initialize(ID3D11Device*, HWND);
|
||||
void Shutdown();
|
||||
bool Render(ID3D11DeviceContext*, int, XMMATRIX, XMMATRIX, XMMATRIX, ID3D11ShaderResourceView*, XMFLOAT4, XMFLOAT4, XMFLOAT4);
|
||||
bool Render(ID3D11DeviceContext*, int, XMMATRIX, XMMATRIX, XMMATRIX, ID3D11ShaderResourceView*, XMFLOAT4, XMFLOAT4, XMFLOAT3);
|
||||
|
||||
private:
|
||||
bool InitializeShader(ID3D11Device*, HWND, WCHAR*, WCHAR*);
|
||||
void ShutdownShader();
|
||||
void OutputShaderErrorMessage(ID3D10Blob*, HWND, WCHAR*);
|
||||
|
||||
bool SetShaderParameters(ID3D11DeviceContext*, XMMATRIX, XMMATRIX, XMMATRIX, ID3D11ShaderResourceView*, XMFLOAT4, XMFLOAT4, XMFLOAT4);
|
||||
bool SetShaderParameters(ID3D11DeviceContext*, XMMATRIX, XMMATRIX, XMMATRIX, ID3D11ShaderResourceView*, XMFLOAT4, XMFLOAT4, XMFLOAT3);
|
||||
void RenderShader(ID3D11DeviceContext*, int);
|
||||
|
||||
private:
|
||||
|
||||
Reference in New Issue
Block a user