DeferredShading demo: Add keys to disable forward pass/light animations
This commit is contained in:
parent
56b8d83bab
commit
67f2ec635a
|
|
@ -477,6 +477,7 @@ int main()
|
||||||
std::size_t backbuffer;
|
std::size_t backbuffer;
|
||||||
|
|
||||||
bool viewerUboUpdate = true;
|
bool viewerUboUpdate = true;
|
||||||
|
bool lightUpdate = true;
|
||||||
|
|
||||||
std::shared_ptr<Nz::TextureSampler> textureSampler = device->InstantiateTextureSampler({});
|
std::shared_ptr<Nz::TextureSampler> textureSampler = device->InstantiateTextureSampler({});
|
||||||
|
|
||||||
|
|
@ -498,6 +499,7 @@ int main()
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
Nz::BakedFrameGraph bakedGraph = [&]
|
Nz::BakedFrameGraph bakedGraph = [&]
|
||||||
{
|
{
|
||||||
Nz::FrameGraph graph;
|
Nz::FrameGraph graph;
|
||||||
|
|
@ -622,6 +624,7 @@ int main()
|
||||||
|
|
||||||
builder.DrawIndexed(static_cast<Nz::UInt32>(cubeMeshGfx->GetIndexCount(0)));
|
builder.DrawIndexed(static_cast<Nz::UInt32>(cubeMeshGfx->GetIndexCount(0)));
|
||||||
});
|
});
|
||||||
|
});
|
||||||
|
|
||||||
forwardPass.AddInput(backbuffer);
|
forwardPass.AddInput(backbuffer);
|
||||||
forwardPass.AddOutput(backbuffer);
|
forwardPass.AddOutput(backbuffer);
|
||||||
|
|
@ -744,6 +747,7 @@ int main()
|
||||||
{
|
{
|
||||||
Nz::UInt64 now = Nz::GetElapsedMicroseconds();
|
Nz::UInt64 now = Nz::GetElapsedMicroseconds();
|
||||||
elapsedTime += (now - time) / 1'000'000.f;
|
elapsedTime += (now - time) / 1'000'000.f;
|
||||||
|
elapsedTime += (now - time) / 1'000'000.f;
|
||||||
time = now;
|
time = now;
|
||||||
|
|
||||||
Nz::WindowEvent event;
|
Nz::WindowEvent event;
|
||||||
|
|
@ -783,6 +787,7 @@ int main()
|
||||||
|
|
||||||
viewerUboUpdate = true;
|
viewerUboUpdate = true;
|
||||||
}
|
}
|
||||||
|
else if (event.key.virtualKey == Nz::Keyboard::VKey::F)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue