minor update - light ui tweak
This commit is contained in:
@@ -438,8 +438,38 @@ bool imguiManager::ImGuiWidgetRenderer(ApplicationClass* app)
|
||||
void imguiManager::WidgetLightWindow(ApplicationClass* app)
|
||||
{
|
||||
ImGui::Begin("Light", &showLightWindow);
|
||||
|
||||
|
||||
// Sun light settings
|
||||
LightClass* sunLight = app->GetSunLight();
|
||||
// Direction input
|
||||
XMFLOAT3 direction = sunLight->GetDirection();
|
||||
float dir[3] = { direction.x, direction.y, direction.z };
|
||||
if (ImGui::DragFloat3("Sun Direction", dir))
|
||||
{
|
||||
sunLight->SetDirection(dir[0], dir[1], dir[2]);
|
||||
}
|
||||
// Color input
|
||||
XMFLOAT4 color = sunLight->GetDiffuseColor();
|
||||
float col[3] = { color.x, color.y, color.z };
|
||||
if (ImGui::ColorEdit3("Sun Color", col))
|
||||
{
|
||||
sunLight->SetDiffuseColor(col[0], col[1], col[2], 1.0f);
|
||||
}
|
||||
// Intensity input
|
||||
float intensity = sunLight->GetIntensity();
|
||||
if (ImGui::DragFloat("Sun Intensity", &intensity, 0.1f, 0.0f, 100.0f))
|
||||
{
|
||||
sunLight->SetIntensity(intensity);
|
||||
}
|
||||
|
||||
|
||||
ImGui::Separator();
|
||||
|
||||
int index = 0;
|
||||
|
||||
// Area light settings
|
||||
|
||||
for(auto& light : app->GetLights())
|
||||
{
|
||||
std::string headerName = "Light " + std::to_string(index);
|
||||
|
||||
Reference in New Issue
Block a user