+ | Transparency Material

This commit is contained in:
TheRedShip
2025-01-16 00:12:31 +01:00
parent a892d5e7e6
commit 787833ac84
12 changed files with 6203 additions and 6118 deletions

View File

@ -199,14 +199,20 @@ void Window::imGuiRender()
has_changed |= ImGui::ColorEdit3("Color", &mat.color[0]);
has_changed |= ImGui::SliderFloat("Emission", &mat.emission, 0.0f, 10.0f);
if (mat.type == 1)
has_changed |= ImGui::SliderFloat("Refraction", &mat.refraction, 1.0f, 5.0f);
else
if (mat.type == 0)
{
has_changed |= ImGui::SliderFloat("Roughness", &mat.roughness, 0.0f, 1.0f);
has_changed |= ImGui::SliderFloat("Metallic", &mat.metallic, 0.0f, 1.0f);
}
has_changed |= ImGui::SliderInt("Type", &mat.type, 0, 1);
else if (mat.type == 1)
has_changed |= ImGui::SliderFloat("Refraction", &mat.refraction, 1.0f, 5.0f);
else if (mat.type == 2)
{
has_changed |= ImGui::SliderFloat("Transparency", &mat.roughness, 0.0f, 1.0f);
has_changed |= ImGui::SliderFloat("Refraction", &mat.refraction, 1.0f, 2.0f);
has_changed |= ImGui::SliderFloat("Proba", &mat.metallic, 0., 1.);
}
has_changed |= ImGui::SliderInt("Type", &mat.type, 0, 2);
ImGui::PopID();