Rendering volumetric at quarter res

This commit is contained in:
antopilo
2025-04-24 19:56:11 -04:00
parent 08be51fc2d
commit 4f24372a2f
12 changed files with 178 additions and 14 deletions

View File

@@ -2956,7 +2956,6 @@ namespace Nuake {
void EditorInterface::Update(float ts)
{
Logger::Log("Opacity: " + std::to_string(ts), "UPDATE");
if (!Engine::GetCurrentScene() || Engine::IsPlayMode())
{
return;

View File

@@ -946,6 +946,54 @@ void SelectionPropertyWidget::DrawFile(Ref<Nuake::File> file)
ImGui::PopStyleColor();
}
ImGui::TableNextColumn();
{
// Title
ImGui::Text("Noise Strength");
ImGui::TableNextColumn();
ImGui::DragFloat("##Noise Strength", &env->mVolumetric->mNoiseStrength, .001f, 0.f, 1.0f);
ImGui::TableNextColumn();
// Reset button
ImGui::PushStyleColor(ImGuiCol_Button, ImVec4(1, 1, 1, 0));
std::string resetBloomThreshold = ICON_FA_UNDO + std::string("##resetBase");
if (ImGui::Button(resetBloomThreshold.c_str())) env->mVolumetric->mNoiseStrength = 1.0f;
ImGui::PopStyleColor();
}
ImGui::TableNextColumn();
{
// Title
ImGui::Text("Noise Scale");
ImGui::TableNextColumn();
ImGui::DragFloat("##Noise Scale", &env->mVolumetric->mNoiseScale, .001f, 0.f, 10.0f);
ImGui::TableNextColumn();
// Reset button
ImGui::PushStyleColor(ImGuiCol_Button, ImVec4(1, 1, 1, 0));
std::string resetBloomThreshold = ICON_FA_UNDO + std::string("##resetBase");
if (ImGui::Button(resetBloomThreshold.c_str())) env->mVolumetric->mNoiseScale = 1.0f;
ImGui::PopStyleColor();
}
ImGui::TableNextColumn();
{
// Title
ImGui::Text("Noise Speed");
ImGui::TableNextColumn();
ImGui::DragFloat("##Noise Speed", &env->mVolumetric->mNoiseSpeed, .001f, 0.f, 10.0f);
ImGui::TableNextColumn();
// Reset button
ImGui::PushStyleColor(ImGuiCol_Button, ImVec4(1, 1, 1, 0));
std::string resetBloomThreshold = ICON_FA_UNDO + std::string("##resetBase");
if (ImGui::Button(resetBloomThreshold.c_str())) env->mVolumetric->mNoiseSpeed = 0.1f;
ImGui::PopStyleColor();
}
ImGui::EndTable();
}
END_COLLAPSE_HEADER()

View File

@@ -81,7 +81,6 @@ void ViewportWidget::Draw()
{
ImGui::PushStyleVar(ImGuiStyleVar_Alpha, overlayOpacity.Value);
Logger::Log("Opacity: " + std::to_string(overlayOpacity.Value), "Animated");
DrawOverlay();
ImGui::PopStyleVar();
}