DeferredShading demo: Add keys to disable forward pass/light animations

This commit is contained in:
Jérôme Leclercq 2021-06-01 16:38:31 +02:00
parent 56b8d83bab
commit 67f2ec635a
1 changed files with 5 additions and 0 deletions

View File

@ -477,6 +477,7 @@ int main()
std::size_t backbuffer;
bool viewerUboUpdate = true;
bool lightUpdate = true;
std::shared_ptr<Nz::TextureSampler> textureSampler = device->InstantiateTextureSampler({});
@ -498,6 +499,7 @@ int main()
}
});
Nz::BakedFrameGraph bakedGraph = [&]
{
Nz::FrameGraph graph;
@ -622,6 +624,7 @@ int main()
builder.DrawIndexed(static_cast<Nz::UInt32>(cubeMeshGfx->GetIndexCount(0)));
});
});
forwardPass.AddInput(backbuffer);
forwardPass.AddOutput(backbuffer);
@ -743,6 +746,7 @@ int main()
while (window.IsOpen())
{
Nz::UInt64 now = Nz::GetElapsedMicroseconds();
elapsedTime += (now - time) / 1'000'000.f;
elapsedTime += (now - time) / 1'000'000.f;
time = now;
@ -783,6 +787,7 @@ int main()
viewerUboUpdate = true;
}
else if (event.key.virtualKey == Nz::Keyboard::VKey::F)
break;
}