Patch
This commit is contained in:
@@ -617,7 +617,17 @@ void Model::Draw(const glm::mat4& model, SkeletonInstance* instance /*= nullptr*
|
||||
|
||||
glm::vec3 pos = model[3];
|
||||
|
||||
Shader* shader = instance ? g_unlitSkinnedShader : g_unlitShader;
|
||||
Shader* shader = g_unlitSkinnedShader; //instance ? g_unlitSkinnedShader : g_unlitShader;
|
||||
|
||||
static glm::mat4 s_identityBones[128];
|
||||
static bool ready = false;
|
||||
if (!ready)
|
||||
{
|
||||
for (int i = 0; i < 128; i++)
|
||||
s_identityBones[i] = glm::mat4(1.0f);
|
||||
|
||||
ready = true;
|
||||
}
|
||||
|
||||
DLight* light = nullptr;
|
||||
|
||||
@@ -704,6 +714,8 @@ void Model::Draw(const glm::mat4& model, SkeletonInstance* instance /*= nullptr*
|
||||
|
||||
if (instance)
|
||||
g_shaderSystem->SetUniformMatrix(shader, UNIFORM_BONE_MATRICES, instance->m_finalMatrices.data(), instance->m_finalMatrices.size());
|
||||
else
|
||||
g_shaderSystem->SetUniformMatrix(shader, UNIFORM_BONE_MATRICES, s_identityBones, 128);
|
||||
|
||||
if (m_data.ib)
|
||||
g_renderDevice->DrawElements(PT_TRIANGLES, m_data.ibcount, 0, NULL);
|
||||
|
||||
Reference in New Issue
Block a user