5#include "core/reflect.h"
16enum class TextureFiltering : uint8_t {
30#define VKM_RENDER_MODES(X) \
31 X(Default, "Default", DEFAULT, true) \
32 X(Depth, "Depth", DEPTH, false) \
33 X(Normals, "Normals", NORMALS, false) \
34 X(Roughness, "Roughness (authored)", ROUGHNESS, false) \
35 X(Metalness, "Metalness (authored)", METALNESS, false) \
36 X(AmbientOcclusion, "Ambient Occlusion", AMBIENT_OCCLUSION, false) \
37 X(Bloom, "Bloom", BLOOM, false) \
38 X(ShadowAtlas, "Shadow Atlas", SHADOW_ATLAS, false) \
39 X(Fog, "Fog", FOG, false) \
40 X(GiOnly, "GI Only", GI_ONLY, true) \
41 X(DirectOnly, "Direct Only", DIRECT_ONLY, true) \
42 X(Clusters, "Light Clusters", CLUSTERS, true)
51#define VKM_TONEMAPS(X) \
52 X(Reinhard, "Reinhard", REINHARD) \
53 X(ACES, "ACES (filmic)", ACES) \
54 X(KhronosNeutral, "Khronos PBR Neutral", KHRONOS_NEUTRAL)
62enum class Tonemap : uint8_t {
63#define VKM_TONEMAP_ENUMERATOR(name, label, glsl) name,
64 VKM_TONEMAPS(VKM_TONEMAP_ENUMERATOR)
65#undef VKM_TONEMAP_ENUMERATOR
74enum class RenderMode : uint8_t {
75#define VKM_RENDER_MODE_ENUMERATOR(name, label, glsl, shaded) name,
76 VKM_RENDER_MODES(VKM_RENDER_MODE_ENUMERATOR)
77#undef VKM_RENDER_MODE_ENUMERATOR
88 RenderMode renderMode = RenderMode::Default;
112 Tonemap tonemap = Tonemap::Reinhard;
161 if (count == samples)
return true;
177template <
typename Settings,
typename Fn>
178void visitShippedRenderFields(Settings& r, Fn&& f) {
181 f(
"probes", r.probes);
183 f(
"gtaoRadius", r.gtaoRadius);
184 f(
"gtaoIntensity", r.gtaoIntensity);
185 f(
"gtaoPower", r.gtaoPower);
186 f(
"ssrMaxRoughness", r.ssrMaxRoughness);
187 f(
"ssrMaxDistance", r.ssrMaxDistance);
188 f(
"bloomStrength", r.bloomStrength);
189 f(
"bloomThreshold", r.bloomThreshold);
190 f(
"bloomKnee", r.bloomKnee);
191 f(
"bloomRadius", r.bloomRadius);
192 f(
"tonemap", r.tonemap);
193 f(
"exposure", r.exposure);
194 f(
"cullMaxDistance", r.cullMaxDistance);
195 f(
"cullMinPixels", r.cullMinPixels);
196 f(
"msaaSamples", r.msaaSamples);
197 f(
"textureFiltering", r.textureFiltering);
198 f(
"textureAnisotropy", r.textureAnisotropy);
199 f(
"shadowResolution", r.shadowResolution);
204#define VKM_TONEMAP_LABEL(name, label, glsl) label,
205VKM_ENUM_NAMES(::Vkm::Engine::Tonemap, VKM_TONEMAPS(VKM_TONEMAP_LABEL))
206#undef VKM_TONEMAP_LABEL
208#define VKM_RENDER_MODE_LABEL(name, label, glsl, shaded) label,
209VKM_ENUM_NAMES(::Vkm::Engine::RenderMode, VKM_RENDER_MODES(VKM_RENDER_MODE_LABEL))
210#undef VKM_RENDER_MODE_LABEL
212VKM_ENUM_NAMES(::Vkm::Engine::TextureFiltering,
"Nearest",
"Bilinear",
"Trilinear")
Editable render tuning: pass toggles + per-effect parameters.
Definition render_settings.h:86
float cullMaxDistance
World-space.
Definition render_settings.h:122
bool ssr
Screen-space reflections, over the probes and the sky.
Definition render_settings.h:94
float cullMinPixels
Screen-pixel size; 0 disables.
Definition render_settings.h:123
uint32_t shadowResolution
Per-tile shadow-atlas resolution (1024/2048/4096); costly to raise.
Definition render_settings.h:141
TextureFiltering textureFiltering
The frame's default texel sampling; TextureParams::filterOverride outranks it.
Definition render_settings.h:135
float bloomStrength
Bloom scale, added pre-tonemap.
Definition render_settings.h:106
static constexpr float MIN_GTAO_RADIUS
The search divides by the radius, so it is never zero.
Definition render_settings.h:147
float bloomRadius
Upsample tent radius, fraction of frame width.
Definition render_settings.h:109
float ssrMaxDistance
World-space trace length.
Definition render_settings.h:103
float ssrMaxRoughness
Rougher surfaces reflect the probes and the sky alone.
Definition render_settings.h:102
float bloomThreshold
On a pixel's brightest channel (linear HDR).
Definition render_settings.h:107
uint32_t msaaSamples
Scene-pass MSAA samples, one of MSAA_SAMPLE_COUNTS; post runs on the resolved buffer.
Definition render_settings.h:127
float bloomKnee
Soft-knee width around the threshold.
Definition render_settings.h:108
static bool isMsaaSampleCount(uint32_t samples)
Whether samples is one of MSAA_SAMPLE_COUNTS.
Definition render_settings.h:159
static constexpr float MAX_GTAO_RADIUS
Past this the search reads the screen, not a neighbourhood.
Definition render_settings.h:149
float gtaoPower
Contrast curve.
Definition render_settings.h:99
float gtaoIntensity
Occlusion strength.
Definition render_settings.h:98
bool grid
Editor ground grid.
Definition render_settings.h:144
float gtaoRadius
World-space sample radius, MIN_GTAO_RADIUS..MAX_GTAO_RADIUS.
Definition render_settings.h:97
static constexpr uint32_t MSAA_SAMPLE_COUNTS[]
1 is off.
Definition render_settings.h:151
uint32_t textureAnisotropy
Degree when the mode is Trilinear (1 = off); clamped to the driver's ceiling.
Definition render_settings.h:137
float exposure
A fixed exposure in stops: the frame is scaled by 2^exposure before the tonemap.
Definition render_settings.h:119