Quantum Phenomena Explorer 7.9.8
Interactive quantum-phenomena Explorer Tutor — source documentation
Loading...
Searching...
No Matches
quantumgraphicspreset.cpp
Go to the documentation of this file.
1/**
2 * @file quantumgraphicspreset.cpp
3 * @brief Implements the quantumgraphicspreset visualization component used by QPE.
4 * @ingroup qpe_graphics
5 *
6 * Source: @c graphics/renderer/quantumgraphicspreset.cpp. This file is part of Quantum Phenomena Explorer (QPE),
7 * maintained by Officina Turini. See LICENSE_IT.txt / LICENSE.txt for the
8 * QPE freeware source-available terms and THIRD_PARTY_NOTICES.txt for
9 * third-party components.
10 */
11
13
14namespace qpe {
15
17{
19
20 switch (kind) {
22 // Quantitative reference view: linear transfer, no HDR glow and no
23 // highlight compression beyond the framebuffer's ordinary display.
24 preset.paletteIndex = 0; // Scientific
25 preset.displayScaleIndex = 0; // Linear
26 preset.exposureEv = 0.0;
27 preset.gamma = 1.0;
28 preset.postPreviewIndex = 0; // Scene
29 preset.brightThreshold = 0.72;
30 preset.brightSoftKnee = 0.08;
31 preset.blurSpread = 2.0;
32 preset.bloomStrength = 0.0;
33 preset.toneMapIndex = 0; // Off / Clip
34 break;
35
37 // Readable live-demo view: preserve a mostly linear scene, add only a
38 // restrained highlight halo and use ACES to protect bright cores.
39 preset.paletteIndex = 0; // Scientific
40 preset.displayScaleIndex = 0; // Linear
41 preset.exposureEv = 0.25;
42 preset.gamma = 1.0;
43 preset.postPreviewIndex = 3; // Bloom
44 preset.brightThreshold = 0.72;
45 preset.brightSoftKnee = 0.08;
46 preset.blurSpread = 2.0;
47 preset.bloomStrength = 0.65;
48 preset.toneMapIndex = 2; // ACES Filmic
49 break;
50
52 default:
53 // Demonstration / "wow" view: reveal weak structures, broaden the
54 // extracted highlights and use a stronger HDR glow with ACES.
55 preset.paletteIndex = 0; // Scientific
56 preset.displayScaleIndex = 1; // Log (~3 decades)
57 preset.exposureEv = -1.0;
58 preset.gamma = 1.15;
59 preset.postPreviewIndex = 3; // Bloom
60 preset.brightThreshold = 0.62;
61 preset.brightSoftKnee = 0.12;
62 preset.blurSpread = 3.25;
63 preset.bloomStrength = 1.80;
64 preset.toneMapIndex = 2; // ACES Filmic
65 break;
66 }
67
68 return preset;
69}
70
72{
73 switch (kind) {
75 return "Scientific";
77 return "Presentation";
79 default:
80 return "Cinematic";
81 }
82}
83
84} // namespace qpe
static QuantumGraphicsPresetValues values(QuantumGraphicsPresetKind kind)
Returns values.
static const char * name(QuantumGraphicsPresetKind kind)
Returns name.
QuantumGraphicsPresetKind
Enumerates the supported Quantum Graphics Preset Kind values.
Declares the quantumgraphicspreset visualization component used by QPE.
Data structure used by the Quantum Graphics Preset Values component.