Ajout du Normal Shader

This commit is contained in:
GolfOcean334
2024-03-31 18:59:07 +02:00
parent b3148d9dfa
commit abc0f158ae
11 changed files with 845 additions and 20 deletions

View File

@@ -32,6 +32,8 @@ private:
XMFLOAT3 position;
XMFLOAT2 texture;
XMFLOAT3 normal;
XMFLOAT3 tangent;
XMFLOAT3 binormal;
};
struct ModelType
@@ -39,6 +41,8 @@ private:
float x, y, z;
float tu, tv;
float nx, ny, nz;
float tx, ty, tz;
float bx, by, bz;
};
struct Vertex {
@@ -53,6 +57,18 @@ private:
float nx, ny, nz;
};
struct TempVertexType
{
float x, y, z;
float tu, tv;
float nx, ny, nz;
};
struct VectorType
{
float x, y, z;
};
struct Face {
int v1, v2, v3;
int t1, t2, t3;
@@ -81,6 +97,9 @@ private:
bool LoadModel(char*);
void ReleaseModel();
void CalculateModelVectors();
void CalculateTangentBinormal(TempVertexType, TempVertexType, TempVertexType, VectorType&, VectorType&);
private:
ID3D11Buffer* m_vertexBuffer, * m_indexBuffer;
int m_vertexCount, m_indexCount;