DeferredShading demo: Add keys to disable forward pass/light animations
This commit is contained in:
@@ -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);
|
||||||
@@ -743,6 +746,7 @@ int main()
|
|||||||
while (window.IsOpen())
|
while (window.IsOpen())
|
||||||
{
|
{
|
||||||
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;
|
||||||
|
|
||||||
@@ -783,6 +787,7 @@ int main()
|
|||||||
|
|
||||||
viewerUboUpdate = true;
|
viewerUboUpdate = true;
|
||||||
}
|
}
|
||||||
|
else if (event.key.virtualKey == Nz::Keyboard::VKey::F)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user