![]() |
vkmEngine 1.0.15
A C++ game engine · vkmengine.com
|
Editable render tuning: pass toggles + per-effect parameters. More...
#include <render_settings.h>
Public Member Functions | |
| uint32_t | sceneExtent (uint32_t viewportPixels) const |
viewportPixels at the scene's scale, renderScale clamped to MIN_RENDER_SCALE..MAX_RENDER_SCALE. | |
| bool | gridShown () const |
| Whether the editor's world grid draws at all. | |
Static Public Member Functions | |
| static float | renderScaleFor (uint32_t height, uint32_t viewportHeight) |
The renderScale that renders a viewport viewportHeight pixels tall at height. | |
| static bool | isMsaaSampleCount (uint32_t samples) |
Whether samples is one of MSAA_SAMPLE_COUNTS. | |
Public Attributes | |
| bool | ssr = true |
| Screen-space reflections, over the probes and the sky. | |
| bool | screenShadows = true |
| The cascaded sun's contacts its cascades are too coarse for. | |
| float | gtaoRadius = 0.6f |
| World-space sample radius, MIN_GTAO_RADIUS..MAX_GTAO_RADIUS. | |
| float | gtaoIntensity = 1.0f |
| Occlusion strength. | |
| float | gtaoPower = 1.5f |
| Contrast curve. | |
| float | ssrMaxRoughness = 0.6f |
| Rougher surfaces reflect the probes and the sky alone. | |
| float | ssrMaxDistance = 50.0f |
| bool | ssrHalfResolution = false |
| float | bloomStrength = 0.06f |
| float | bloomThreshold = 2.0f |
| float | bloomKnee = 0.5f |
| Soft-knee width around the threshold. | |
| float | bloomRadius = 0.005f |
| Upsample tent radius, fraction of frame width. | |
| float | exposure = 1.0f |
| The exposure in stops: the frame is scaled by 2^exposure before the tonemap. | |
| bool | autoExposure = false |
| Adapt the exposure to the frame's brightness, as an eye does (system/render/exposure.h). | |
| float | exposureMinimum = -4.0f |
| float | adaptBrighter = 1.0f |
| float | cullMaxDistance = 500.0f |
| World-space. | |
| float | cullMinPixels = 3.0f |
| Screen-pixel size; 0 disables. | |
| bool | occlusionCulling = false |
| Cull the opaque geometry other geometry hides, on the GPU. | |
| uint32_t | msaaSamples = 4 |
| Scene-pass MSAA samples, one of MSAA_SAMPLE_COUNTS; post runs on the resolved buffer. | |
| TextureFiltering | textureFiltering = TextureFiltering::Trilinear |
| The frame's default texel sampling; TextureParams::filterOverride outranks it. | |
| uint32_t | textureAnisotropy = 16 |
| Degree when the mode is Trilinear (1 = off); clamped to the driver's ceiling. | |
| uint32_t | shadowResolution = 4096 |
| The largest shadow tile's edge, one of SHADOW_RESOLUTIONS, the sun's near cascades'; costly to raise. | |
| bool | softShadows = true |
| Shadows soft as each light's sourceRadius makes them (PCSS); off, every shadow takes the hard 3x3 filter, as a light of no size does. | |
| float | renderScale = 1.0f |
| The scene's pixels as a share of the viewport's on each axis, MIN_RENDER_SCALE..MAX_RENDER_SCALE. | |
Editable render tuning: pass toggles + per-effect parameters.
Carried on FrameContext::render; copied into RenderView::settings each frame.
|
inlinestatic |
The renderScale that renders a viewport viewportHeight pixels tall at height.
For a settings screen that offers resolutions (WindowManager::renderResolutions): the window keeps its size and the frame is scaled up to it.
| height | The chosen resolution's height. |
| viewportHeight | The viewport's. |
|
inline |
viewportPixels at the scene's scale, renderScale clamped to MIN_RENDER_SCALE..MAX_RENDER_SCALE.
| viewportPixels | A viewport extent. |
|
inline |
Whether the editor's world grid draws at all.
|
inlinestatic |
Whether samples is one of MSAA_SAMPLE_COUNTS.
| samples | A requested msaaSamples. |
| float Vkm::Engine::RenderSettings::ssrMaxDistance = 50.0f |
World-space trace length.
| bool Vkm::Engine::RenderSettings::ssrHalfResolution = false |
A ray every two by two pixels, gathered back to each by the surfaces they lie on: the reflected picture keeps its detail, only where a ray lands is coarser.
| float Vkm::Engine::RenderSettings::bloomStrength = 0.06f |
Bloom scale, added pre-tonemap.
| float Vkm::Engine::RenderSettings::bloomThreshold = 2.0f |
On a pixel's brightest channel, after the exposure: past a sunlit white's, so what glows is a highlight, an emitter or the sun.
| float Vkm::Engine::RenderSettings::exposure = 1.0f |
The exposure in stops: the frame is scaled by 2^exposure before the tonemap.
0 is as lit. One stop up by default, the daylight balance the procedural sky is built for. With autoExposure it is added to the adapted stops.
| float Vkm::Engine::RenderSettings::exposureMinimum = -4.0f |
The adapted stops' range, before exposure is added: how far it darkens a bright frame and brightens a dark one.
| float Vkm::Engine::RenderSettings::adaptBrighter = 1.0f |
How fast it brightens a frame grown dark, and darkens one grown bright: the share of the gap closed in a second is 1 - e^-rate. By default it brightens slower, as an eye does.
| bool Vkm::Engine::RenderSettings::occlusionCulling = false |
Cull the opaque geometry other geometry hides, on the GPU.
Off by default: it pays only where the GPU bounds the frame and much of the scene is hidden (docs/reference/visibility.md).
| TextureFiltering Vkm::Engine::RenderSettings::textureFiltering = TextureFiltering::Trilinear |
The frame's default texel sampling; TextureParams::filterOverride outranks it.
textureAnisotropy is ignored unless this is Trilinear. Unrelated to MaterialAsset::anisotropy (the BRDF lobe).
| bool Vkm::Engine::RenderSettings::softShadows = true |
Shadows soft as each light's sourceRadius makes them (PCSS); off, every shadow takes the hard 3x3 filter, as a light of no size does.
The soft path's blocker search and its wider filter are the forward pass's dearest work.
| float Vkm::Engine::RenderSettings::renderScale = 1.0f |
The scene's pixels as a share of the viewport's on each axis, MIN_RENDER_SCALE..MAX_RENDER_SCALE.
The scene, its effects and their targets render at RenderView::sceneWidth/sceneHeight, and the composite scales the frame up to the viewport, where the UI draws at full resolution.