Minor: Ajout Light Shader

This commit is contained in:
GolfOcean334 2024-04-11 09:05:59 +02:00
parent d286e71ebe
commit 1bba2047b1

View File

@ -1027,19 +1027,19 @@ bool ApplicationClass::Render(float rotation, float x, float y, float z, float t
return false;
}
//// Setup matrices.
//rotateMatrix = XMMatrixRotationY(rotation);
//translateMatrix = XMMatrixTranslation(-10.0f, -2.0f, -20.0f);
//worldMatrix = XMMatrixMultiply(rotateMatrix, translateMatrix);
// Setup matrices.
rotateMatrix = XMMatrixRotationY(rotation);
translateMatrix = XMMatrixTranslation(-10.0f, -2.0f, -20.0f);
worldMatrix = XMMatrixMultiply(rotateMatrix, translateMatrix);
// Render the model using the transparent shader.
//m_Model->Render(m_Direct3D->GetDeviceContext());
m_Model->Render(m_Direct3D->GetDeviceContext());
//result = m_ShaderManager->RenderlightShader(m_Direct3D->GetDeviceContext(), m_Model->GetIndexCount(), worldMatrix, viewMatrix, projectionMatrix, m_Model->GetTexture(0), m_Lights[0]->GetDiffuseColor(), m_Lights[0]->GetPosition());
//if (!result)
//{
// return false;
//}
result = m_ShaderManager->RenderlightShader(m_Direct3D->GetDeviceContext(), m_Model->GetIndexCount(), worldMatrix, viewMatrix, projectionMatrix, m_Model->GetTexture(0), diffuseColor, lightPosition);
if (!result)
{
return false;
}
// Turn off alpha blending.
m_Direct3D->DisableAlphaBlending();