Ajout du Normal Shader
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user