|
AMFP Enhanced
C++ reference: the code this unofficial fork added
|
the comfort pass (PLAN.md "Comfort pass"). More...
#include <cmath>Go to the source code of this file.
Classes | |
| struct | cLuxComfortValues |
| Multipliers: 1 = vanilla, 0 = none. More... | |
Enumerations | |
| enum | eLuxComfortProfile { eLuxComfort_Original , eLuxComfort_Reduced , eLuxComfort_Comfort , eLuxComfort_Custom , eLuxComfort_LastEnum } |
Functions | |
| cLuxComfortValues | LuxComfortProfile (int alProfile) |
| float | LuxComfortClamp01 (float x) |
| cLuxComfortValues | LuxComfortSanitize (cLuxComfortValues v) |
| Values read from a config: multipliers 0..1, FOV within the slider range. | |
| bool | LuxComfortSame (const cLuxComfortValues &a, const cLuxComfortValues &b) |
| int | LuxComfortDetect (const cLuxComfortValues &v) |
| Which profile the values are, or Custom. | |
| int | LuxComfortFromOld (int alScriptedMotion, bool abReduceHeadBob) |
| Profiles saved before the comfort tab: "Scripted camera effects" and "Reduce head bob". | |
| float | LuxComfortAmount (float afVanilla, float afMul) |
| Effects whose neutral value is 0 (shake, blur size, trail amount, roll angle, bob). | |
| float | LuxComfortMul (float afVanilla, float afMul) |
| Effects whose neutral value is 1 (FOV and aspect multipliers). | |
| float | LuxComfortBlurStart (float afVanillaStart, float afBlur) |
| Radial blur start distance (0 = from the centre, 1 = edges only): lower blur keeps more of the centre sharp (Comfort 0.2 -> at least 0.7). | |
| float | LuxComfortSpinSpeed (float afVanillaSpeed, float afHeadSpin) |
| Head spin start speed: the spin slows at a fixed rate, so its angle grows with speed squared; the square root makes mfHeadSpin scale the angle (Comfort 0.15 -> about 7 degrees). | |
| float | LuxComfortTurnCapDeg (float afTurnSpeed) |
| Forced turn cap in degrees per second, or 0 for no cap (vanilla). | |
| float | LuxComfortLimitStep (float afStepRad, float afTimeStep, float afCapDeg) |
| Limit one frame's angle step (radians) to the cap; 0 cap = untouched. | |
| int | LuxComfortArmSamples (int alVanilla, float afArmLag) |
| Arm lag: number of camera samples averaged (vanilla 13); at least 1 (no lag). | |
| float | LuxComfortRemoved (float afVanilla, float afApplied, float afFullScale) |
| How much of a distortion was removed, 0..1, relative to a full-strength amount. | |
| float | LuxComfortEaseCue (float afCurrent, float afGoal, float afTimeStep) |
| Ease the edge darkening toward its goal (0..1) over about kLuxEdgeCueFadeTime. | |
Variables | |
| static const float | kLuxVanillaFov = 70.0f |
| static const float | kLuxFovMin = 60.0f |
| static const float | kLuxFovMax = 90.0f |
| static const float | kLuxVanillaHeadSpinDeg = 46.0f |
| static const float | kLuxEdgeCueMaxAlpha = 0.35f |
| static const float | kLuxEdgeCueFadeTime = 0.3f |
the comfort pass (PLAN.md "Comfort pass").
Separates what makes the body sick (roll, smearing, shake, zoom pulses, fast forced turns, view lag) from what tells the story (sound, the fever): the effects keep their vanilla values and these multipliers are applied where each one reaches the camera or the screen ("scale on output"), so effects the game code starts itself are covered too, saves keep vanilla values, and changing the option applies at once.
Profiles: Original (exactly vanilla, built in), Reduced, Comfort (default under Modern); any change on the Comfort tab makes it Custom. Pure, unit tested in tests/cpp/test_comfort.cpp.
Definition in file LuxComfort.h.
| enum eLuxComfortProfile |
| Enumerator | |
|---|---|
| eLuxComfort_Original | |
| eLuxComfort_Reduced | |
| eLuxComfort_Comfort | |
| eLuxComfort_Custom | |
| eLuxComfort_LastEnum | |
Definition at line 16 of file LuxComfort.h.
|
inline |
Definition at line 48 of file LuxComfort.h.
|
inline |
Definition at line 72 of file LuxComfort.h.
|
inline |
Values read from a config: multipliers 0..1, FOV within the slider range.
Definition at line 75 of file LuxComfort.h.
|
inline |
Definition at line 85 of file LuxComfort.h.
|
inline |
Which profile the values are, or Custom.
Definition at line 97 of file LuxComfort.h.
|
inline |
Profiles saved before the comfort tab: "Scripted camera effects" and "Reduce head bob".
The old default (Reduced) moves to the new default, Comfort; only a deliberate stock setup stays Original.
Definition at line 106 of file LuxComfort.h.
|
inline |
Effects whose neutral value is 0 (shake, blur size, trail amount, roll angle, bob).
Definition at line 116 of file LuxComfort.h.
|
inline |
Effects whose neutral value is 1 (FOV and aspect multipliers).
Definition at line 119 of file LuxComfort.h.
|
inline |
Radial blur start distance (0 = from the centre, 1 = edges only): lower blur keeps more of the centre sharp (Comfort 0.2 -> at least 0.7).
Vanilla blur leaves it untouched.
Definition at line 123 of file LuxComfort.h.
|
inline |
Head spin start speed: the spin slows at a fixed rate, so its angle grows with speed squared; the square root makes mfHeadSpin scale the angle (Comfort 0.15 -> about 7 degrees).
Definition at line 132 of file LuxComfort.h.
|
inline |
Forced turn cap in degrees per second, or 0 for no cap (vanilla).
Comfort 0.15 -> 52.5.
Definition at line 138 of file LuxComfort.h.
|
inline |
Limit one frame's angle step (radians) to the cap; 0 cap = untouched.
Definition at line 145 of file LuxComfort.h.
|
inline |
Arm lag: number of camera samples averaged (vanilla 13); at least 1 (no lag).
Definition at line 155 of file LuxComfort.h.
|
inline |
How much of a distortion was removed, 0..1, relative to a full-strength amount.
Drives the edge darkening that stands in for it.
Definition at line 163 of file LuxComfort.h.
|
inline |
Ease the edge darkening toward its goal (0..1) over about kLuxEdgeCueFadeTime.
Definition at line 173 of file LuxComfort.h.
|
static |
Definition at line 43 of file LuxComfort.h.
|
static |
Definition at line 44 of file LuxComfort.h.
|
static |
Definition at line 45 of file LuxComfort.h.
|
static |
Definition at line 46 of file LuxComfort.h.
|
static |
Definition at line 169 of file LuxComfort.h.
|
static |
Definition at line 170 of file LuxComfort.h.