79 for(
int i = 0; i < 9; ++i) *vMul[i] = (*vMul[i] == *vMul[i]) ?
LuxComfortClamp01(*vMul[i]) : 1.0f;
87 const float e = 0.005f;
119inline float LuxComfortMul(
float afVanilla,
float afMul) {
return 1.0f + (afVanilla - 1.0f) * afMul; }
125 if(afBlur >= 1.0f)
return afVanillaStart;
127 return afVanillaStart > fMin ? afVanillaStart : fMin;
140 if(afTurnSpeed >= 1.0f)
return 0;
147 if(afCapDeg <= 0 || afTimeStep <= 0)
return afStepRad;
148 float fMax = afCapDeg * 3.14159265f / 180.0f * afTimeStep;
149 if(afStepRad > fMax)
return fMax;
150 if(afStepRad < -fMax)
return -fMax;
158 return l < 1 ? 1 : l;
165 if(afFullScale <= 0)
return 0;
176 if(afCurrent < afGoal)
return afCurrent + fStep > afGoal ? afGoal : afCurrent + fStep;
177 return afCurrent - fStep < afGoal ? afGoal : afCurrent - fStep;
static const float kLuxFovMin
int LuxComfortDetect(const cLuxComfortValues &v)
Which profile the values are, or Custom.
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 squ...
static const float kLuxFovMax
float LuxComfortBlurStart(float afVanillaStart, float afBlur)
Radial blur start distance (0 = from the centre, 1 = edges only): lower blur keeps more of the centre...
static const float kLuxVanillaFov
float LuxComfortMul(float afVanilla, float afMul)
Effects whose neutral value is 1 (FOV and aspect multipliers).
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.
static const float kLuxEdgeCueFadeTime
float LuxComfortClamp01(float x)
int LuxComfortArmSamples(int alVanilla, float afArmLag)
Arm lag: number of camera samples averaged (vanilla 13); at least 1 (no lag).
float LuxComfortAmount(float afVanilla, float afMul)
Effects whose neutral value is 0 (shake, blur size, trail amount, roll angle, bob).
float LuxComfortLimitStep(float afStepRad, float afTimeStep, float afCapDeg)
Limit one frame's angle step (radians) to the cap; 0 cap = untouched.
cLuxComfortValues LuxComfortProfile(int alProfile)
float LuxComfortTurnCapDeg(float afTurnSpeed)
Forced turn cap in degrees per second, or 0 for no cap (vanilla).
cLuxComfortValues LuxComfortSanitize(cLuxComfortValues v)
Values read from a config: multipliers 0..1, FOV within the slider range.
int LuxComfortFromOld(int alScriptedMotion, bool abReduceHeadBob)
Profiles saved before the comfort tab: "Scripted camera effects" and "Reduce head bob".
static const float kLuxVanillaHeadSpinDeg
bool LuxComfortSame(const cLuxComfortValues &a, const cLuxComfortValues &b)
static const float kLuxEdgeCueMaxAlpha
Multipliers: 1 = vanilla, 0 = none.