minor update - light ui tweak

This commit is contained in:
2025-01-23 20:55:55 +01:00
parent c355509870
commit d8851cc679
12 changed files with 66 additions and 21 deletions

View File

@@ -277,14 +277,16 @@ bool ApplicationClass::Initialize(int screenWidth, int screenHeight, HWND hwnd)
m_Lights[3]->SetSpecularPower(16.0f);
m_Lights[3]->SetPosition(-10.0f, 7.0f, 5.0f);
// Create || THE SUN ||
// ------------------------------------------------------------- //
// ----------------------- || THE SUN || ----------------------- //
// ------------------------------------------------------------- //
m_SunLight = new LightClass;
m_SunLight->SetDiffuseColor(1.0f, 1.0f, 1.0f, 1.0f); // White
m_SunLight->SetDirection(0.0f, -1.0f, 0.0f);
m_SunLight->SetAmbientColor(0.15f, 0.15f, 0.15f, 1.0f);
m_SunLight->SetSpecularColor(1.0f, 1.0f, 1.0f, 1.0f);
m_SunLight->SetSpecularPower(16.0f);
m_SunLight->SetPosition(0.0f, 100.0f, 0.0f);
m_SunLight->SetIntensity(1.0f);
// Create and initialize the normal map shader object.
m_ShaderManager = new ShaderManagerClass;
@@ -1944,7 +1946,7 @@ bool ApplicationClass::RenderPass(const std::vector<std::reference_wrapper<std::
case Object::SUNLIGHT:
result = m_ShaderManager->RenderSunlightShader(m_Direct3D->GetDeviceContext(), object->GetIndexCount(), worldMatrix, view, projection,
object->GetTexture(0), m_SunLight->GetDiffuseColor(), m_SunLight->GetAmbientColor(), m_SunLight->GetDirection());
object->GetTexture(0), m_SunLight->GetDiffuseColor(), m_SunLight->GetAmbientColor(), m_SunLight->GetDirection(), m_SunLight->GetIntensity());
if (!result)
{
Logger::Get().Log("Could not render the object model using the sunlight shader", __FILE__, __LINE__, Logger::LogLevel::Error);