MCPcopy Create free account
hub / github.com/NVIDIAGameWorks/Falcor / renderUI

Method renderUI

Source/RenderPasses/SimplePostFX/SimplePostFX.cpp:315–391  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

313}
314
315void SimplePostFX::renderUI(Gui::Widgets& widget)
316{
317 // Controls for output size.
318 // When output size requirements change, we'll trigger a graph recompile to update the render pass I/O sizes.
319 if (widget.dropdown("Output size", mOutputSizeSelection))
320 requestRecompile();
321 if (mOutputSizeSelection == RenderPassHelpers::IOSize::Fixed)
322 {
323 if (widget.var("Size in pixels", mFixedOutputSize, 32u, 16384u))
324 requestRecompile();
325 }
326
327 // PostFX options.
328 widget.checkbox("Enable post fx", mEnabled);
329 widget.slider("Wipe", mWipe, 0.f, 1.f);
330 if (auto group = widget.group("Lens FX", true))
331 {
332 group.slider("Bloom", mBloomAmount, 0.f, 1.f);
333 group.slider("Bloom Star", mStarAmount, 0.f, 1.f);
334 group.slider("Star Angle", mStarAngle, 0.f, 1.f, true);
335 group.slider("Vignette", mVignetteAmount, 0.f, 1.f);
336 group.slider("Chromatic Aberration", mChromaticAberrationAmount, 0.f, 1.f);
337 group.slider("Barrel Distortion", mBarrelDistortAmount, 0.f, 1.f);
338 if (group.button("reset this group"))
339 {
340 mBloomAmount = 0.f;
341 mStarAmount = 0.f;
342 mStarAngle = 0.1f;
343 mVignetteAmount = 0.f;
344 mChromaticAberrationAmount = 0.f;
345 mBarrelDistortAmount = 0.f;
346 }
347 }
348 if (auto group = widget.group("Saturation", true))
349 {
350 group.slider("Shadow Saturation", mSaturationCurve.x, 0.f, 2.f);
351 group.slider("Midtone Saturation", mSaturationCurve.y, 0.f, 2.f);
352 group.slider("Hilight Saturation", mSaturationCurve.z, 0.f, 2.f);
353 if (group.button("reset this group"))
354 {
355 mSaturationCurve = float3(1.f);
356 }
357 }
358 if (auto group = widget.group("Offset/Power/Scale (luma)", true))
359 {
360 group.slider("Luma Offset (Shadows)", mColorOffsetScalar, -1.f, 1.f);
361 group.slider("Luma Power (Midtones)", mColorPowerScalar, -1.f, 1.f);
362 group.slider("Luma Scale (Hilights)", mColorScaleScalar, -1.f, 1.f);
363 if (group.button("reset this group"))
364 {
365 mColorOffsetScalar = 0.f;
366 mColorPowerScalar = 0.f;
367 mColorScaleScalar = 0.f;
368 }
369 }
370 if (auto group = widget.group("Offset/Power/Scale (color)", true))
371 {
372 if (group.button("reset##1"))

Callers

nothing calls this directly

Calls 8

requestRecompileFunction · 0.85
dropdownMethod · 0.80
varMethod · 0.80
checkboxMethod · 0.80
sliderMethod · 0.80
groupMethod · 0.80
buttonMethod · 0.80
rgbColorMethod · 0.80

Tested by

no test coverage detected