Support Forum G3D Web Page |
Public Member Functions | |
HDRFramebufferSettings () | |
Vector2int32 | hdrFramebufferSizeFromDeviceSize (const Vector2int32 osWindowSize) const |
void | setGuardBandsAndSampleRate (int colorGuard, int extraDepthGuard=0, float sampleRate=1.0f) |
Vector2int16 | trimBandThickness () const |
Public Attributes | |
Vector2int16 | colorGuardBandThickness |
The default call to Film::exposeAndRender in the sample "starter" project crops these off, and the default App::onGraphics3D in that project. More... | |
Vector2int16 | depthGuardBandThickness |
Must be non-negative and at least as large as colorGuardBandThickness. More... | |
Array< const ImageFormat * > | preferredColorFormats |
Formats to attempt to use for the Film, in order of decreasing preference. More... | |
Array< const ImageFormat * > | preferredDepthFormats |
Formats to attempt to use for the Film, in order of decreasing preference. More... | |
float | sampleRateOneDimension = 1.0f |
Size of G3D::GApp::m_osWindowHDRFramebuffer (and G3D::GApp::m_gbuffer, if used) in each dimension as a multiple of the size of G3D::GApp::m_osWindowDeviceFramebuffer in that dimension, not including the colorGuardBandThickness and depthGuardBandThickness. More... | |
|
inline |
Vector2int32 G3D::GApp::Settings::HDRFramebufferSettings::hdrFramebufferSizeFromDeviceSize | ( | const Vector2int32 | osWindowSize | ) | const |
|
inline |
|
inline |
Vector2int16 G3D::GApp::Settings::HDRFramebufferSettings::colorGuardBandThickness |
The default call to Film::exposeAndRender in the sample "starter" project crops these off, and the default App::onGraphics3D in that project.
The use of a guard band allows screen-space effects to avoid boundary cases at the edge of the screen. For example, G3D::AmbientOcclusion, G3D::MotionBlur, and G3D::DepthOfField.
Guard band pixels count against the field of view (this keeps rendering and culling code simpler), so the effective field of view observed.
Note that a 128-pixel guard band at 1920x1080 allocates 40% more pixels than no guard band, so there may be a substantial memory overhead to a guard band even though there is little per-pixel rendering cost due to using RenderDevice::clip2D.
Must be non-negative. Default value is (0, 0). These are final frame pixels, so when changing sampleRateOneDimension, it is usually a good idea to change these values by the same amount.
Referenced by setGuardBandsAndSampleRate(), and trimBandThickness().
Vector2int16 G3D::GApp::Settings::HDRFramebufferSettings::depthGuardBandThickness |
Must be non-negative and at least as large as colorGuardBandThickness.
Default value is (0, 0). These are final frame pixels, so when changing sampleRateOneDimension, it is usually a good idea to change these values by the same amount.
Referenced by setGuardBandsAndSampleRate(), and trimBandThickness().
Array<const ImageFormat*> G3D::GApp::Settings::HDRFramebufferSettings::preferredColorFormats |
Formats to attempt to use for the Film, in order of decreasing preference.
Referenced by HDRFramebufferSettings().
Array<const ImageFormat*> G3D::GApp::Settings::HDRFramebufferSettings::preferredDepthFormats |
Formats to attempt to use for the Film, in order of decreasing preference.
nullptr (or an empty list) indicates that no depth buffer should be allocated.
If you want separate depth and stencil attachments, you must explicitly allocate the stencil buffer yourself and attach it to the depth buffer.
Referenced by HDRFramebufferSettings().
float G3D::GApp::Settings::HDRFramebufferSettings::sampleRateOneDimension = 1.0f |
Size of G3D::GApp::m_osWindowHDRFramebuffer (and G3D::GApp::m_gbuffer, if used) in each dimension as a multiple of the size of G3D::GApp::m_osWindowDeviceFramebuffer in that dimension, not including the colorGuardBandThickness and depthGuardBandThickness.
Default is 1.0. Values greater than 1 result in supersampling (e.g., sampleRateOneDimension = 2 produces 4x FSAA), values less than 1 result in subsampling. The result will always be stretched to fill the screen.
Referenced by setGuardBandsAndSampleRate().