All vertex attributes now present in DX shaders

This commit is contained in:
2015-10-19 13:53:12 +02:00
parent e195e69408
commit d423239320
8 changed files with 33 additions and 12 deletions
+2 -2
View File
@@ -603,7 +603,7 @@ public:
m_ShakeIntensity = m_ShakeRepresentativeIntensity;
if (m_ShakeIntensity <= 0) {
m_ScreenShake = false;
m_Renderer->PlaceCamera(glm::vec3(0, 0, 0));
//m_Renderer->PlaceCamera(glm::vec3(0, 0, 0));
return;
}
} else {
@@ -619,7 +619,7 @@ public:
//std::cout << "X: " << randomX << " Y: " << randomY << std::endl;
m_Renderer->PlaceCamera(glm::vec3(randomX, randomY, 0));
//m_Renderer->PlaceCamera(glm::vec3(randomX, randomY, 0));
}
}
+4 -4
View File
@@ -65,15 +65,15 @@ public:
float FarClip() const { return m_FarClip; }
void SetFarClip(float val);
private:
void UpdateViewMatrix();
void UpdateProjectionMatrix();
float m_AspectRatio;
float m_FOV;
float m_NearClip;
float m_FarClip;
private:
void UpdateViewMatrix();
void UpdateProjectionMatrix();
glm::vec3 m_Position;
glm::quat m_Orientation;
@@ -60,7 +60,6 @@ private:
} constantBufferStruct;
ShaderProgram* shaderProgram = nullptr;
const Model* testModel = nullptr;
ID3D11Buffer* constantBuffer = nullptr;
static DirectX::SimpleMath::Matrix GLMtoDXModelView(glm::mat4 m);
+1
View File
@@ -80,6 +80,7 @@ public:
std::vector<Vertex> m_Vertices;
std::vector<unsigned int> m_Indices;
Skeleton* m_Skeleton = nullptr;
glm::mat4 m_Matrix;
private:
std::vector<glm::ivec2> BoneIndices;
+7
View File
@@ -28,6 +28,7 @@ namespace dd
{
class Model;
class Skeleton;
class Texture;
class RenderQueue;
@@ -63,6 +64,12 @@ struct ModelJob : RenderJob
unsigned int StartIndex = 0;
unsigned int EndIndex = 0;
// Animation
dd::Skeleton* Skeleton = nullptr;
bool NoRootMotion = true;
std::string AnimationName;
double AnimationTime = 0;
void CalculateHash() override
{
Hash = TextureID;