HDR Sample


Category:  Visuals
Min PC GPU: Fermi -based (GTX 4xx)
Min Tegra Device: Tegra 4

Description

This sample demonstrates High Dynamic Rendering with Auto-Exposure and Tonemapping

APIs Used

Shared User Interface

The OpenGL samples all share a common app framework and certain user interface elements, centered around the "Tweakbar" panel on the left side of the screen, which lets you interactively control certain variables in each sample.

To show and hide the Tweakbar, simply click or touch the triangular button positioned in the top-left of the view.

Other controls are listed below:

Device Input Result
touch 1-Finger Drag Orbit-rotate the camera
2-Finger Drag Move up/down/left/right
2-Finger Pinch Scale the view
mouse Left-Button Drag Orbit-rotate the camera
Right-Button Drag Move up/down/left/right
Middle-Click Drag Scale the view (up:out, down:in)
keyboard Escape Quit the application
  Tab Toggle Tweakbar visibility
gamepad Start Toggle Tweakbar visibility
  Right Thumbstick Orbit-rotate the camera
  Left Thumbstick Move forward/backward. Slide left/right
  Left/Right Triggers Move up/down

Technical Details

Introduction

High Dynamic Range (HDR) imaging has become an essential feature for both photography and game graphics.

Dynamic range is simply defined as the ratio in brightness between the brightest and darkest parts of an image. HDR images allow the full range of brightness in a scene to be captured accurately.

For a full description see: http://en.wikipedia.org/wiki/High-dynamic-range_imaging

Rendering Procedure

  1. Render Scene to an RGBA16F FBO at full dynamic range.

  2. Downsize (filter) scene buffer by 4x in both dimensions for post processing.

  3. Downsize (filter) the result by a further 16x in each dimension. Run a compute shader on the result to generate a single luminance value for auto-exposure calculations.

  4. Extract the highlighted areas for further processing by thresholding luminance values above and below an adjustable cutoff. Scale the result as desired.

  5. Generate a pyramid of processed images, computing another Gaussian blur on each.

  6. Generate highlight streaks in four directions.

  7. Generate ghosted highlight images in 2 passes.

  8. Composite the passes into a final image.

  9. Compress the result to low dynamic range via tonemapping and gamma correction to the onscreen RGB888 framebuffer.

UI

References

ftp://download.nvidia.com/developer/presentations/2004/6800_Leagues/6800_Leagues_HDR.pdf

http://en.wikipedia.org/wiki/High-dynamic-range_imaging

http://www.daionet.gr.jp/~masa/

http://http.developer.nvidia.com/GPUGems2/gpugems2_chapter20.html

 

 


NVIDIA® GameWorks™ Documentation Rev. 1.0.220830 ©2014-2022. NVIDIA Corporation and affiliates. All Rights Reserved.