MCPcopy Create free account
hub / github.com/NVIDIA-RTX/RTXPT / DLSSFGSelectorUI

Method DLSSFGSelectorUI

Rtxpt/SampleUI.cpp:349–378  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

347}
348
349void SampleUI::DLSSFGSelectorUI()
350{
351 const char* items[] = { "Off", "2x", "3x", "4x" };
352 const int itemCount = IM_ARRAYSIZE(items);
353
354 static int currentItem = 0;
355 if (ImGui::BeginCombo("Frame Generation", items[currentItem]))
356 {
357 for (int itemId = 0; itemId < itemCount; itemId++)
358 {
359 UI_SCOPED_DISABLE(itemId > m_ui.DLSSFGMaxNumFramesToGenerate);
360
361 bool isSelected = (currentItem == itemId);
362 if (ImGui::Selectable(items[itemId], isSelected))
363 currentItem = itemId;
364 if (isSelected)
365 ImGui::SetItemDefaultFocus();
366 }
367 ImGui::EndCombo();
368 }
369
370 m_ui.DLSSFGMode = (currentItem > 0)
371 ? donut::app::StreamlineInterface::DLSSGMode::eOn
372 : donut::app::StreamlineInterface::DLSSGMode::eOff;
373
374 m_ui.DLSSFGNumFramesToGenerate = (m_ui.DLSSFGMode == donut::app::StreamlineInterface::DLSSGMode::eOn) ? currentItem : 1;
375
376 if (!m_ui.RealtimeMode)
377 ImGui::TextColored(warnColor, "Note: DLSS-G is DISABLED in Reference PT mode");
378};
379
380
381

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected