AMFP Enhanced
C++ reference: the code this unofficial fork added
Loading...
Searching...
No Matches
LuxComfortFx.h File Reference

comfort pass helpers for the screen effects (shake, image trail, radial blur) in LuxEffectHandler.cpp. More...

#include "LuxComfort.h"
#include <cmath>

Go to the source code of this file.

Functions

float LuxComfortShakeBlend (float afShake, float afTimeStep)
 Share of the new random shake sample taken this frame: 1 = raw per-frame jitter (vanilla, at shake >= 1); lower shake smooths the jitter into a slower wobble, frame rate independent.
float LuxComfortLowPass (float afPrev, float afTarget, float afBlend)
 One low-pass step; a blend of 1 returns the target exactly (vanilla jitter).

Variables

static const float kLuxComfortShakeFullScale = 0.1f
static const float kLuxComfortTrailFullScale = 1.0f
static const float kLuxComfortBlurFullScale = 0.25f
static const float kLuxComfortShakeSmoothTime = 0.08f
 Time constant (s) of the shake jitter low-pass at shake 0; it shrinks to 0 (no smoothing) at 1.

Detailed Description

comfort pass helpers for the screen effects (shake, image trail, radial blur) in LuxEffectHandler.cpp.

Pure, unit tested in tests/cpp/test_comfort_fx.cpp. Shared profile values and the general helpers live in LuxComfort.h.

Definition in file LuxComfortFx.h.

Function Documentation

◆ LuxComfortShakeBlend()

float LuxComfortShakeBlend ( float afShake,
float afTimeStep )
inline

Share of the new random shake sample taken this frame: 1 = raw per-frame jitter (vanilla, at shake >= 1); lower shake smooths the jitter into a slower wobble, frame rate independent.

Definition at line 28 of file LuxComfortFx.h.

◆ LuxComfortLowPass()

float LuxComfortLowPass ( float afPrev,
float afTarget,
float afBlend )
inline

One low-pass step; a blend of 1 returns the target exactly (vanilla jitter).

Definition at line 37 of file LuxComfortFx.h.

Variable Documentation

◆ kLuxComfortShakeFullScale

const float kLuxComfortShakeFullScale = 0.1f
static

Definition at line 19 of file LuxComfortFx.h.

◆ kLuxComfortTrailFullScale

const float kLuxComfortTrailFullScale = 1.0f
static

Definition at line 20 of file LuxComfortFx.h.

◆ kLuxComfortBlurFullScale

const float kLuxComfortBlurFullScale = 0.25f
static

Definition at line 21 of file LuxComfortFx.h.

◆ kLuxComfortShakeSmoothTime

const float kLuxComfortShakeSmoothTime = 0.08f
static

Time constant (s) of the shake jitter low-pass at shake 0; it shrinks to 0 (no smoothing) at 1.

Definition at line 24 of file LuxComfortFx.h.