DayZ 1.24
Loading...
Searching...
No Matches
PPEffects Class Reference

Deprecated; 'PPEManager' used instead. More...

Collaboration diagram for PPEffects:
[legend]

Static Private Member Functions

static void Init ()
 
static void ResetBlurEffects ()
 
static void ResetRadialBlur ()
 
static void SetBlurValue (int index, float value)
 
static int RegisterBlurEffect ()
 
static void SetRadialBlur (float powerX, float powerY, float offsetX, float offsetY)
 sets blur effect to an absolute value between 0..1
 
static void SetBlur (float value)
 sets blur effect to an absolute value between 0..1
 
static void UpdateBlur ()
 updates the blur post process effect where the resulting blur is an aggregate of all individual blur effect values
 
static void SetBlurInventory (float value)
 Set blur inventory effect to a specified 'value' between 0..1.
 
static void SetBlurDrunk (float value)
 Set blur drunk effect to a specified 'value' between 0..1.
 
static void SetBlurFever (float value)
 Set blur drunk effect to a specified 'value' between 0..1.
 
static void SetBlurMenu (float value)
 Set menu blur to a specified 'value' between 0..1.
 
static void SetBlurOptics (float value)
 Set optics and ironsights blur to a specified 'value' between 0..1.
 
static void SetBlurFlashbang (float value)
 Set blur flashbang hit effect to a specified 'value' between 0..1.
 
static void SetBlurShock (float value)
 
static int RegisterChromAbbEffect ()
 
static void ResetChromAbbEffects ()
 
static void SetChromAbbValue (int index, float value)
 
static void SetChromAbb (float value)
 
static void UpdateChromAbb ()
 updates the chromatic abberation post process effect where the resulting chromabb is an aggregate of all individual chromabb effect values
 
static void SetChromAbbOptic (float value)
 
static void ResetColorEffects ()
 
static void SetColorValue (int index, float r, float g, float b, float a, float overlay)
 
static int RegisterColorEffect ()
 
static void UpdateColor ()
 
static void SetLensEffect (float lens, float chromAbb, float centerX, float centerY)
 
static void PerformSetLensEffect (float lens, float chromAbb, float centerX, float centerY)
 added for convenience
 
static void SetVignette (float intensity, float R, float G, float B, float A)
 
static void SetVignetteEffectValue (int index, float intensity, float r, float g, float b, float a)
 
static int RegisterVignetteEffect ()
 
static void SetUnconsciousnessVignette (float value)
 
static void SetShockVignette (float value)
 
static void SetTunnelVignette (float value)
 
static void SetMenuVignette (float value)
 
static void ResetVignettes ()
 
static void OverrideDOF (bool enable, float focusDistance, float focusLength, float focusLengthNear, float blur, float focusDepthOffset)
 
static void AddPPMask (float ndcX, float ndcY, float ndcRadius, float ndcBlur)
 
static void ResetPPMask ()
 
static void ResetDOFOverride ()
 
static void ResetLensEffect ()
 
static void HitEffect (float value)
 
static void SetShockEffectColor (float value)
 
static void FlashbangEffect (float value)
 
static void EnableBurlapSackBlindness ()
 
static void DisableBurlapSackBlindness ()
 
static void SetDeathDarkening (float value)
 
static void UpdateSaturation ()
 
static void UpdateVignette ()
 
static void SetBloodSaturation (float value)
 
static void SetColorizationNV (float r, float g, float b)
 
static void UpdateColorize ()
 
static void ResetColorize ()
 
static void SetEVValuePP (float value)
 
static void SetNVParams (float light_mult, float noise_intensity, float sharpness, float grain_size)
 
static void SetBloom (float thres, float steep, float inten)
 
static void ResetAll ()
 

Static Private Attributes

static const int COLORIZE_NV = 100
 
static const float COLOR_SHOCK = 0.1
 
static int m_BlurInventory
 
static int m_BlurDrunk
 
static int m_BlurFever
 
static int m_BlurMenu
 
static int m_BlurOptics
 
static int m_BlurFlashbang
 
static int m_BlurShock
 
static int m_BurlapBlindness
 
static int m_DyingEffect
 
static int m_ShockEffect
 
static int m_ChromAbbOptic
 
static int m_VignetteUnconscious
 
static int m_VignetteShock
 
static int m_VignetteTunnel
 
static int m_VignetteMenu
 
static float m_BloodSaturation
 
static ref array< floatm_BlurValues
 
static ref array< floatm_ChromAbbValues
 
static ref array< intm_VignetteEffects
 
static ref map< int, ref array< float > > m_VignetteValues
 
static ref map< int, ref array< float > > m_ColorValues
 
static ref array< floatm_ColorEffect
 
static ref map< int, ref array< float > > m_ColorizeEffects
 
static float m_ColorValueTotal [4] = {0, 0, 0, 0}
 
static float m_ColorOverlayTotal
 
static Material m_MatColors
 
static Material m_RadialBlur
 

Detailed Description

Deprecated; 'PPEManager' used instead.

Definition at line 2 of file PPEffects.c.

Member Function Documentation

◆ AddPPMask()

static void PPEffects::AddPPMask ( float ndcX,
float ndcY,
float ndcRadius,
float ndcBlur )
inlinestaticprivate

Definition at line 476 of file PPEffects.c.

477 {
478 GetGame().AddPPMask(ndcX, ndcY, ndcRadius, ndcBlur);
479 }
proto native CGame GetGame()

References GetGame().

◆ DisableBurlapSackBlindness()

static void PPEffects::DisableBurlapSackBlindness ( )
inlinestaticprivate

Definition at line 545 of file PPEffects.c.

546 {
547 SetColorValue(m_BurlapBlindness, 0, 0, 0, 0, 0.0);
548 UpdateColor();
549 g_Game.SetEVValue(0);
550 }
DayZGame g_Game
Definition DayZGame.c:3528
static void UpdateColor()
Definition PPEffects.c:347
static int m_BurlapBlindness
Definition PPEffects.c:21
static void SetColorValue(int index, float r, float g, float b, float a, float overlay)
Definition PPEffects.c:330

References g_Game, m_BurlapBlindness, SetColorValue(), and UpdateColor().

◆ EnableBurlapSackBlindness()

static void PPEffects::EnableBurlapSackBlindness ( )
inlinestaticprivate

Definition at line 538 of file PPEffects.c.

539 {
540 SetColorValue(m_BurlapBlindness, 0, 0, 0, 1, 1.0);
541 UpdateColor();
542 g_Game.SetEVValue(-5);
543 }

References g_Game, m_BurlapBlindness, SetColorValue(), and UpdateColor().

◆ FlashbangEffect()

static void PPEffects::FlashbangEffect ( float value)
inlinestaticprivate

Definition at line 526 of file PPEffects.c.

527 {
528 float hitEffectColor[4];
529 hitEffectColor[0] = 1;
530 hitEffectColor[1] = 1;
531 hitEffectColor[2] = 1;
533
534 m_MatColors.SetParam("OverlayColor", hitEffectColor);
535 m_MatColors.SetParam("OverlayFactor", 0.75);
536 }
Definition EnMath.c:7
static Material m_MatColors
Definition PPEffects.c:49
static float m_ColorValueTotal[4]
Definition PPEffects.c:46
static proto float Lerp(float a, float b, float time)
Linearly interpolates between 'a' and 'b' given 'time'.
static proto float Clamp(float value, float min, float max)
Clamps 'value' to 'min' if it is lower than 'min', or to 'max' if it is higher than 'max'.

References Math::Clamp(), Math::Lerp(), m_ColorValueTotal, and m_MatColors.

◆ HitEffect()

static void PPEffects::HitEffect ( float value)
inlinestaticprivate

Definition at line 496 of file PPEffects.c.

497 {
498 float m_HitEffectColor[4];
500 m_HitEffectColor[1] = 0;
501 m_HitEffectColor[2] = 0;
503 /*
504 Print("---------------------------");
505 Print("m_ColorValueTotal[0]: " + m_ColorValueTotal[0]);
506 Print("value: " + value);
507 Print("---------------------------");
508 Print("r: " + m_HitEffectColor[0]);
509 Print("g: " + m_HitEffectColor[1]);
510 Print("b: " + m_HitEffectColor[2]);
511 Print("a: " + m_HitEffectColor[3]);
512 */
513 m_MatColors.SetParam("OverlayColor", m_HitEffectColor);
514 m_MatColors.SetParam("OverlayFactor", 0.05);
515 }

References Math::Clamp(), Math::Lerp(), m_ColorValueTotal, and m_MatColors.

◆ Init()

static void PPEffects::Init ( )
inlinestaticprivate

Definition at line 52 of file PPEffects.c.

53 {
54 //Print("---Init PPEffects---");
55 if (m_BlurValues)
56 delete m_BlurValues;
58 delete m_ChromAbbValues;
60 delete m_VignetteEffects;
62 delete m_VignetteValues;
63 if (m_ColorEffect)
64 delete m_ColorEffect;
65
66 m_MatColors = GetGame().GetWorld().GetMaterial("graphics/materials/postprocess/glow");
67 m_RadialBlur = GetGame().GetWorld().GetMaterial("graphics/materials/postprocess/radialblur");
72
73 // add new blur effects here
80
81 // add chromatic abberation effects here
83 //m_ChromAbbShock = RegisterChromAbbEffect();
84
85 // add vignette effects here
90
93
94 // add new color effects here
98
99 // ------------------------NV-related stuff below------------------------
100 array<float> colorizeDefault = {0.0, 0.0, 0.0};
102
103 // colorize: r, g, b
104 // colorize effects registration
106 //SetNVParams(1.0, 0.0, 2.35, 2.75); //default values
107 // ------------------------End of NV-related stuff------------------------
108 }
Deprecated; 'PPEManager' used instead.
Definition PPEffects.c:3
static int m_BlurFever
Definition PPEffects.c:15
static int m_BlurOptics
Definition PPEffects.c:17
static int m_BlurMenu
Definition PPEffects.c:16
static int RegisterVignetteEffect()
Definition PPEffects.c:428
static ref map< int, ref array< float > > m_VignetteValues
Definition PPEffects.c:38
static ref array< int > m_VignetteEffects
Definition PPEffects.c:37
static const int COLORIZE_NV
Definition PPEffects.c:5
static int m_VignetteMenu
Definition PPEffects.c:31
static int m_ShockEffect
Definition PPEffects.c:23
static int m_VignetteShock
Definition PPEffects.c:29
static int RegisterBlurEffect()
Definition PPEffects.c:133
static int m_DyingEffect
Definition PPEffects.c:22
static int m_BlurFlashbang
Definition PPEffects.c:18
static ref array< float > m_ColorEffect
Definition PPEffects.c:40
static int RegisterColorEffect()
Definition PPEffects.c:342
static ref map< int, ref array< float > > m_ColorizeEffects
Definition PPEffects.c:41
static int m_BlurDrunk
Definition PPEffects.c:14
static Material m_RadialBlur
Definition PPEffects.c:50
static ref array< float > m_ChromAbbValues
Definition PPEffects.c:36
static int m_ChromAbbOptic
Definition PPEffects.c:25
static int m_VignetteTunnel
Definition PPEffects.c:30
static int RegisterChromAbbEffect()
Definition PPEffects.c:235
static int m_VignetteUnconscious
Definition PPEffects.c:28
static ref array< float > m_BlurValues
Definition PPEffects.c:35
static ref map< int, ref array< float > > m_ColorValues
Definition PPEffects.c:39
static int m_BlurInventory
Definition PPEffects.c:13

References COLORIZE_NV, GetGame(), m_BlurDrunk, m_BlurFever, m_BlurFlashbang, m_BlurInventory, m_BlurMenu, m_BlurOptics, m_BlurValues, m_BurlapBlindness, m_ChromAbbOptic, m_ChromAbbValues, m_ColorEffect, m_ColorizeEffects, m_ColorValues, m_DyingEffect, m_MatColors, m_RadialBlur, m_ShockEffect, m_VignetteEffects, m_VignetteMenu, m_VignetteShock, m_VignetteTunnel, m_VignetteUnconscious, m_VignetteValues, RegisterBlurEffect(), RegisterChromAbbEffect(), RegisterColorEffect(), and RegisterVignetteEffect().

Referenced by DayZIntroScene::DayZIntroScene(), DayZIntroSceneXbox::DayZIntroSceneXbox(), and MissionBase::OnInit().

◆ OverrideDOF()

static void PPEffects::OverrideDOF ( bool enable,
float focusDistance,
float focusLength,
float focusLengthNear,
float blur,
float focusDepthOffset )
inlinestaticprivate

Definition at line 471 of file PPEffects.c.

References GetGame().

Referenced by ResetDOFOverride().

◆ PerformSetLensEffect()

static void PPEffects::PerformSetLensEffect ( float lens,
float chromAbb,
float centerX,
float centerY )
inlinestaticprivate

added for convenience

Definition at line 389 of file PPEffects.c.

390 {
391 m_MatColors.SetParam("LensDistort", lens);
393 m_MatColors.SetParam("LensCenterX", centerX);
394 m_MatColors.SetParam("LensCenterY", centerY);
395 }
static void SetChromAbbOptic(float value)
Definition PPEffects.c:286

References m_MatColors, and SetChromAbbOptic().

Referenced by SetLensEffect().

◆ RegisterBlurEffect()

static int PPEffects::RegisterBlurEffect ( )
inlinestaticprivate

Definition at line 133 of file PPEffects.c.

134 {
135 return m_BlurValues.Insert(0);
136 }

References m_BlurValues.

Referenced by Init().

◆ RegisterChromAbbEffect()

static int PPEffects::RegisterChromAbbEffect ( )
inlinestaticprivate

Definition at line 235 of file PPEffects.c.

236 {
237 return m_ChromAbbValues.Insert(0);
238 }

References m_ChromAbbValues.

Referenced by Init().

◆ RegisterColorEffect()

static int PPEffects::RegisterColorEffect ( )
inlinestaticprivate

Definition at line 342 of file PPEffects.c.

343 {
344 return m_ColorEffect.Insert(0);
345 }

References m_ColorEffect.

Referenced by Init().

◆ RegisterVignetteEffect()

static int PPEffects::RegisterVignetteEffect ( )
inlinestaticprivate

Definition at line 428 of file PPEffects.c.

429 {
430 return m_VignetteEffects.Insert(0);
431 }

References m_VignetteEffects.

Referenced by Init().

◆ ResetAll()

static void PPEffects::ResetAll ( )
inlinestaticprivate

Definition at line 712 of file PPEffects.c.

713 {
717 ResetPPMask();
721 //RemoveUnconsciousnessVignette();
723 }
static void ResetVignettes()
Definition PPEffects.c:457
static void ResetDOFOverride()
Definition PPEffects.c:486
static void ResetBlurEffects()
Definition PPEffects.c:110
static void ResetPPMask()
Definition PPEffects.c:481
static void ResetColorize()
Definition PPEffects.c:674
static void SetBloodSaturation(float value)
Definition PPEffects.c:608
static void ResetLensEffect()
Definition PPEffects.c:491
static void ResetColorEffects()
Definition PPEffects.c:317

References ResetBlurEffects(), ResetColorEffects(), ResetColorize(), ResetDOFOverride(), ResetLensEffect(), ResetPPMask(), ResetVignettes(), and SetBloodSaturation().

◆ ResetBlurEffects()

static void PPEffects::ResetBlurEffects ( )
inlinestaticprivate

Definition at line 110 of file PPEffects.c.

111 {
112 if (m_BlurValues)
113 {
114 for (int i = 0; i < m_BlurValues.Count(); ++i)
115 m_BlurValues[i] = 0;
116 UpdateBlur();
117 }
118 }
static void UpdateBlur()
updates the blur post process effect where the resulting blur is an aggregate of all individual blur ...
Definition PPEffects.c:164

References m_BlurValues, and UpdateBlur().

Referenced by ResetAll().

◆ ResetChromAbbEffects()

static void PPEffects::ResetChromAbbEffects ( )
inlinestaticprivate

Definition at line 240 of file PPEffects.c.

241 {
243 {
244 for (int i = 0; i < m_ChromAbbValues.Count(); ++i)
245 m_ChromAbbValues[i] = 0;
247 }
248 }
static void UpdateChromAbb()
updates the chromatic abberation post process effect where the resulting chromabb is an aggregate of ...
Definition PPEffects.c:272

References m_ChromAbbValues, and UpdateChromAbb().

◆ ResetColorEffects()

static void PPEffects::ResetColorEffects ( )
inlinestaticprivate

Definition at line 317 of file PPEffects.c.

318 {
319 if (m_ColorEffect)
320 {
321 for (int i = 0; i < m_ColorEffect.Count(); ++i)
322 {
323 //m_ColorEffect[i] = 0;
324 m_ColorValues.Set(i, {0, 0, 0, 0, 0});
325 }
326 UpdateColor();
327 }
328 }

References m_ColorEffect, m_ColorValues, and UpdateColor().

Referenced by ResetAll().

◆ ResetColorize()

static void PPEffects::ResetColorize ( )
inlinestaticprivate

Definition at line 674 of file PPEffects.c.

675 {
676 float color[4];
677 color[0] = 1.0;
678 color[1] = 1.0;
679 color[2] = 1.0;
680 color[3] = 0;
681 m_MatColors.SetParam("ColorizationColor", color);
682 }

References m_MatColors.

Referenced by ResetAll(), and UpdateColorize().

◆ ResetDOFOverride()

static void PPEffects::ResetDOFOverride ( )
inlinestaticprivate

Definition at line 486 of file PPEffects.c.

487 {
488 OverrideDOF(false, 0, 0, 0, 0, 1);
489 }
static void OverrideDOF(bool enable, float focusDistance, float focusLength, float focusLengthNear, float blur, float focusDepthOffset)
Definition PPEffects.c:471

References OverrideDOF().

Referenced by ResetAll().

◆ ResetLensEffect()

static void PPEffects::ResetLensEffect ( )
inlinestaticprivate

Definition at line 491 of file PPEffects.c.

492 {
493 SetLensEffect(0, 0, 0, 0);
494 }
static void SetLensEffect(float lens, float chromAbb, float centerX, float centerY)
Definition PPEffects.c:383

References SetLensEffect().

Referenced by ResetAll().

◆ ResetPPMask()

static void PPEffects::ResetPPMask ( )
inlinestaticprivate

Definition at line 481 of file PPEffects.c.

482 {
483 if (GetGame()) GetGame().ResetPPMask();
484 }

References GetGame().

Referenced by ResetAll().

◆ ResetRadialBlur()

static void PPEffects::ResetRadialBlur ( )
inlinestaticprivate

Definition at line 120 of file PPEffects.c.

121 {
122 SetRadialBlur(0, 0, 0, 0);
123 }
static void SetRadialBlur(float powerX, float powerY, float offsetX, float offsetY)
sets blur effect to an absolute value between 0..1
Definition PPEffects.c:140

References SetRadialBlur().

◆ ResetVignettes()

static void PPEffects::ResetVignettes ( )
inlinestaticprivate

Definition at line 457 of file PPEffects.c.

458 {
460 {
461 for (int i = 0; i < m_VignetteValues.Count(); ++i)
462 {
463 array<float> values = {0, 0, 0, 0, 0};
464
466 }
468 }
469 }
static void UpdateVignette()
Definition PPEffects.c:568

References m_VignetteValues, and UpdateVignette().

Referenced by ResetAll().

◆ SetBloodSaturation()

static void PPEffects::SetBloodSaturation ( float value)
inlinestaticprivate

Definition at line 608 of file PPEffects.c.

609 {
612 }
static float m_BloodSaturation
Definition PPEffects.c:33
static void UpdateSaturation()
Definition PPEffects.c:563

References m_BloodSaturation, and UpdateSaturation().

Referenced by ResetAll().

◆ SetBloom()

static void PPEffects::SetBloom ( float thres,
float steep,
float inten )
inlinestaticprivate

Definition at line 705 of file PPEffects.c.

706 {
707 m_MatColors.SetParam("BloomThreshold", thres);
708 m_MatColors.SetParam("BloomSteepness", steep);
709 m_MatColors.SetParam("BloomIntensity", inten);
710 }

References m_MatColors.

◆ SetBlur()

static void PPEffects::SetBlur ( float value)
inlinestaticprivate

sets blur effect to an absolute value between 0..1

Definition at line 152 of file PPEffects.c.

153 {
154 if (GetGame())
155 {
156 Material mat_blur = GetGame().GetWorld().GetMaterial("graphics/materials/postprocess/gauss");
157
158 if (mat_blur)
159 mat_blur.SetParam("Intensity", value);
160 }
161 }

References GetGame().

Referenced by UpdateBlur().

◆ SetBlurDrunk()

static void PPEffects::SetBlurDrunk ( float value)
inlinestaticprivate

Set blur drunk effect to a specified 'value' between 0..1.

Definition at line 184 of file PPEffects.c.

185 {
187 UpdateBlur();
188 }
static void SetBlurValue(int index, float value)
Definition PPEffects.c:125

References m_BlurDrunk, SetBlurValue(), and UpdateBlur().

◆ SetBlurFever()

static void PPEffects::SetBlurFever ( float value)
inlinestaticprivate

Set blur drunk effect to a specified 'value' between 0..1.

Definition at line 192 of file PPEffects.c.

193 {
195 UpdateBlur();
196 }

References m_BlurFever, SetBlurValue(), and UpdateBlur().

◆ SetBlurFlashbang()

static void PPEffects::SetBlurFlashbang ( float value)
inlinestaticprivate

Set blur flashbang hit effect to a specified 'value' between 0..1.

Definition at line 216 of file PPEffects.c.

217 {
219 UpdateBlur();
220 }

References m_BlurFlashbang, SetBlurValue(), and UpdateBlur().

◆ SetBlurInventory()

static void PPEffects::SetBlurInventory ( float value)
inlinestaticprivate

Set blur inventory effect to a specified 'value' between 0..1.

Definition at line 177 of file PPEffects.c.

178 {
180 UpdateBlur();
181 }

References m_BlurInventory, SetBlurValue(), and UpdateBlur().

◆ SetBlurMenu()

static void PPEffects::SetBlurMenu ( float value)
inlinestaticprivate

Set menu blur to a specified 'value' between 0..1.

Definition at line 200 of file PPEffects.c.

201 {
203 UpdateBlur();
204 }

References m_BlurMenu, SetBlurValue(), and UpdateBlur().

◆ SetBlurOptics()

static void PPEffects::SetBlurOptics ( float value)
inlinestaticprivate

Set optics and ironsights blur to a specified 'value' between 0..1.

Definition at line 208 of file PPEffects.c.

209 {
211 UpdateBlur();
212 }

References m_BlurOptics, SetBlurValue(), and UpdateBlur().

◆ SetBlurShock()

static void PPEffects::SetBlurShock ( float value)
inlinestaticprivate

Definition at line 222 of file PPEffects.c.

223 {
225 UpdateBlur();
226 }
static int m_BlurShock
Definition PPEffects.c:19

References m_BlurShock, SetBlurValue(), and UpdateBlur().

◆ SetBlurValue()

static void PPEffects::SetBlurValue ( int index,
float value )
inlinestaticprivate

Definition at line 125 of file PPEffects.c.

126 {
127 if (m_BlurValues && index < m_BlurValues.Count())
129 else
130 Print("Error: PPEffects: m_BlurValues with index: " + index + " is not registered.");
131 }
proto void Print(void var)
Prints content of variable to console/log.

References m_BlurValues, and Print().

Referenced by SetBlurDrunk(), SetBlurFever(), SetBlurFlashbang(), SetBlurInventory(), SetBlurMenu(), SetBlurOptics(), and SetBlurShock().

◆ SetChromAbb()

static void PPEffects::SetChromAbb ( float value)
inlinestaticprivate

Definition at line 258 of file PPEffects.c.

259 {
260 if (GetGame())
261 {
262 if (m_MatColors)
263 {
264 //Print("SetChromAbb: " + value);
265 m_MatColors.SetParam("MaxChromAbberation", value);
266 //SetVignette(value,0,255,0);
267 }
268 }
269 }

References GetGame(), and m_MatColors.

Referenced by UpdateChromAbb().

◆ SetChromAbbOptic()

static void PPEffects::SetChromAbbOptic ( float value)
inlinestaticprivate

Definition at line 286 of file PPEffects.c.

287 {
290 }
static void SetChromAbbValue(int index, float value)
Definition PPEffects.c:250

References m_ChromAbbOptic, SetChromAbbValue(), and UpdateChromAbb().

Referenced by PerformSetLensEffect().

◆ SetChromAbbValue()

static void PPEffects::SetChromAbbValue ( int index,
float value )
inlinestaticprivate

Definition at line 250 of file PPEffects.c.

251 {
252 if (m_ChromAbbValues && index < m_ChromAbbValues.Count())
254 else
255 Print("Error: PPEffects: m_ChromAbbValues with index: " + index + " is not registered.");
256 }

References m_ChromAbbValues, and Print().

Referenced by SetChromAbbOptic().

◆ SetColorizationNV()

static void PPEffects::SetColorizationNV ( float r,
float g,
float b )
inlinestaticprivate

Definition at line 627 of file PPEffects.c.

628 {
629 array<float> colorizeArray = {r, g, b};
632 }
static void UpdateColorize()
Definition PPEffects.c:634

References COLORIZE_NV, m_ColorizeEffects, and UpdateColorize().

◆ SetColorValue()

static void PPEffects::SetColorValue ( int index,
float r,
float g,
float b,
float a,
float overlay )
inlinestaticprivate

Definition at line 330 of file PPEffects.c.

331 {
332 if (index < m_ColorEffect.Count())
333 {
334 array<float> values = {r, g, b, a, overlay};
335
337 }
338 else
339 Print("Error: PPEffects: m_ColorValues with index: " + index + " is not registered.");
340 }

References m_ColorEffect, m_ColorValues, and Print().

Referenced by DisableBurlapSackBlindness(), EnableBurlapSackBlindness(), SetDeathDarkening(), and SetShockEffectColor().

◆ SetDeathDarkening()

static void PPEffects::SetDeathDarkening ( float value)
inlinestaticprivate

Definition at line 552 of file PPEffects.c.

553 {
554 value = Math.Clamp(value, 0, 1);
555 SetColorValue(m_DyingEffect, 0, 0, 0, 1, value);
556 UpdateColor();
557 if (value > 0.99)
558 SetEVValuePP(-5); //additional "darkness" to avoid lens flare
559 else
560 SetEVValuePP(0);
561 }
static void SetEVValuePP(float value)
Definition PPEffects.c:685

References Math::Clamp(), m_DyingEffect, SetColorValue(), SetEVValuePP(), and UpdateColor().

◆ SetEVValuePP()

static void PPEffects::SetEVValuePP ( float value)
inlinestaticprivate

Definition at line 685 of file PPEffects.c.

686 {
687 g_Game.SetEVValue(value);
688 }

References g_Game.

Referenced by SetDeathDarkening().

◆ SetLensEffect()

static void PPEffects::SetLensEffect ( float lens,
float chromAbb,
float centerX,
float centerY )
inlinestaticprivate

set lens effect

Parameters
lens<-5, 5>, 0 = disable (performance plus), > 0 = outside effect, < 0 inside effect
chromAbb<0, 1>, chromaticity, 1 = max, 0 disable (performance plus)
centerX<-1, 1>, center of effect, 0 = screen center in X
centerY<-1, 1>, center of effect, 0 = screen center in Y

Definition at line 383 of file PPEffects.c.

384 {
386 }
static void PerformSetLensEffect(float lens, float chromAbb, float centerX, float centerY)
added for convenience
Definition PPEffects.c:389

References PerformSetLensEffect().

Referenced by ResetLensEffect().

◆ SetMenuVignette()

static void PPEffects::SetMenuVignette ( float value)
inlinestaticprivate

Definition at line 451 of file PPEffects.c.

452 {
453 SetVignetteEffectValue(m_VignetteMenu, value, 0, 0, 0, 0); //todo
455 }
static void SetVignetteEffectValue(int index, float intensity, float r, float g, float b, float a)
Definition PPEffects.c:416

References m_VignetteMenu, SetVignetteEffectValue(), and UpdateVignette().

◆ SetNVParams()

static void PPEffects::SetNVParams ( float light_mult,
float noise_intensity,
float sharpness,
float grain_size )
inlinestaticprivate

Definition at line 692 of file PPEffects.c.

693 {
694 Material matHDR = GetGame().GetWorld().GetMaterial("Graphics/Materials/postprocess/filmgrainNV");
695 /*#ifdef PLATFORM_CONSOLE
696 //worst-case scenario console fix!
697 noise_intensity = 0.0;
698 #endif*/
699 g_Game.NightVissionLightParams(light_mult, noise_intensity);
700 matHDR.SetParam("Sharpness", sharpness);
701 matHDR.SetParam("GrainSize", grain_size);
702 }

References g_Game, and GetGame().

◆ SetRadialBlur()

static void PPEffects::SetRadialBlur ( float powerX,
float powerY,
float offsetX,
float offsetY )
inlinestaticprivate

sets blur effect to an absolute value between 0..1

Definition at line 140 of file PPEffects.c.

141 {
142 if (GetGame())
143 {
144 m_RadialBlur.SetParam("PowerX", powerX);
145 m_RadialBlur.SetParam("PowerY", powerY);
146 m_RadialBlur.SetParam("OffsetX", offsetX);
147 m_RadialBlur.SetParam("OffsetY", offsetY);
148 }
149 }

References GetGame(), and m_RadialBlur.

Referenced by ResetRadialBlur().

◆ SetShockEffectColor()

static void PPEffects::SetShockEffectColor ( float value)
inlinestaticprivate

Definition at line 517 of file PPEffects.c.

518 {
519 if (value > 0)
521 else
522 SetColorValue(m_ShockEffect, 0, 0, 0, 1, value);
523 UpdateColor();
524 }
static const float COLOR_SHOCK
Definition PPEffects.c:8

References COLOR_SHOCK, m_ShockEffect, SetColorValue(), and UpdateColor().

◆ SetShockVignette()

static void PPEffects::SetShockVignette ( float value)
inlinestaticprivate

Definition at line 439 of file PPEffects.c.

440 {
441 SetVignetteEffectValue(m_VignetteShock, value, 0, 0, 0, 0); //todo
443 }

References m_VignetteShock, SetVignetteEffectValue(), and UpdateVignette().

◆ SetTunnelVignette()

static void PPEffects::SetTunnelVignette ( float value)
inlinestaticprivate

Definition at line 445 of file PPEffects.c.

446 {
447 SetVignetteEffectValue(m_VignetteTunnel, value, 0, 0, 0, 0); //todo
449 }

References m_VignetteTunnel, SetVignetteEffectValue(), and UpdateVignette().

◆ SetUnconsciousnessVignette()

static void PPEffects::SetUnconsciousnessVignette ( float value)
inlinestaticprivate

Definition at line 433 of file PPEffects.c.

434 {
437 }

References m_VignetteUnconscious, SetVignetteEffectValue(), and UpdateVignette().

◆ SetVignette()

static void PPEffects::SetVignette ( float intensity,
float R,
float G,
float B,
float A )
inlinestaticprivate

set vignette

Parameters
intensity<0, 1>, intensity of effect, 0 = disable
R
G
B

Definition at line 404 of file PPEffects.c.

405 {
406 float color[4];
407 color[0] = R;
408 color[1] = G;
409 color[2] = B;
410 color[3] = A;
411
412 m_MatColors.SetParam("Vignette", intensity);
413 m_MatColors.SetParam("VignetteColor", color);
414 }
@ R
reverse
Definition Car.c:67
@ B
Definition EnSystem.c:346
@ A
Definition EnSystem.c:345

References A, B, m_MatColors, and R.

Referenced by UpdateVignette().

◆ SetVignetteEffectValue()

static void PPEffects::SetVignetteEffectValue ( int index,
float intensity,
float r,
float g,
float b,
float a )
inlinestaticprivate

Definition at line 416 of file PPEffects.c.

417 {
418 if (index < m_VignetteEffects.Count())
419 {
420 array<float> values = {intensity, r, g, b, a};
421
423 }
424 else
425 Print("Error: PPEffects: m_ColorValues with index: " + index + " is not registered.");
426 }

References m_VignetteEffects, m_VignetteValues, and Print().

Referenced by SetMenuVignette(), SetShockVignette(), SetTunnelVignette(), and SetUnconsciousnessVignette().

◆ UpdateBlur()

static void PPEffects::UpdateBlur ( )
inlinestaticprivate

updates the blur post process effect where the resulting blur is an aggregate of all individual blur effect values

Definition at line 164 of file PPEffects.c.

165 {
166 float blur_value_total = 0;
167 if (m_BlurValues)
168 {
169 for (int i = 0; i < m_BlurValues.Count(); ++i)
171 }
172
174 }
static void SetBlur(float value)
sets blur effect to an absolute value between 0..1
Definition PPEffects.c:152

References m_BlurValues, and SetBlur().

Referenced by ResetBlurEffects(), SetBlurDrunk(), SetBlurFever(), SetBlurFlashbang(), SetBlurInventory(), SetBlurMenu(), SetBlurOptics(), and SetBlurShock().

◆ UpdateChromAbb()

static void PPEffects::UpdateChromAbb ( )
inlinestaticprivate

updates the chromatic abberation post process effect where the resulting chromabb is an aggregate of all individual chromabb effect values

Definition at line 272 of file PPEffects.c.

273 {
274 float chromabb_value_total = 0;
276 {
277 for (int i = 0; i < m_ChromAbbValues.Count(); ++i)
278 {
279 chromabb_value_total += m_ChromAbbValues[i]; //currently additive!
280 }
281 }
282
284 }
static void SetChromAbb(float value)
Definition PPEffects.c:258

References m_ChromAbbValues, and SetChromAbb().

Referenced by ResetChromAbbEffects(), and SetChromAbbOptic().

◆ UpdateColor()

static void PPEffects::UpdateColor ( )
inlinestaticprivate

Definition at line 347 of file PPEffects.c.

348 {
349 float color_value_total[4] = {0, 0, 0, 0};
350 float color_overlay;
351 /*
352 m_MatColors.ResetParam("OverlayColor");
353 m_MatColors.ResetParam("OverlayFactor");
354 */
355 if (!GetGame() || !GetGame().GetWorld())
356 return;
357
358 for (int i = 0; i < m_ColorValues.Count(); ++i)
359 {
360 int key = m_ColorValues.GetKey(i);
362
367 color_overlay += value[4];
368 }
369
372 m_MatColors.SetParam("OverlayColor", color_value_total);
373 m_MatColors.SetParam("OverlayFactor", color_overlay);
374 }
static float m_ColorOverlayTotal
Definition PPEffects.c:47

References GetGame(), m_ColorOverlayTotal, m_ColorValues, m_ColorValueTotal, and m_MatColors.

Referenced by DisableBurlapSackBlindness(), EnableBurlapSackBlindness(), ResetColorEffects(), SetDeathDarkening(), and SetShockEffectColor().

◆ UpdateColorize()

static void PPEffects::UpdateColorize ( )
inlinestaticprivate

Definition at line 634 of file PPEffects.c.

635 {
636 bool foundActiveEffect = false;
637 int lowestKey = 1000000;
639 // search for active effect with highest priority (lower value of key better)
640 for (int i = 0; i < m_ColorizeEffects.Count(); i++)
641 {
642 int currentKey = m_ColorizeEffects.GetKey(i);
644 // check for non-zero active effect
645 for (int j = 0; j < colorizeValues.Count(); j++)
646 {
647 if (colorizeValues[j] != 0.0)
648 {
649 if (currentKey < lowestKey)
650 {
653 foundActiveEffect = true;
654 break;
655 }
656 }
657 }
658 }
660 {
661 float color[4];
662 color[0] = chosenArray[0];
663 color[1] = chosenArray[1];
664 color[2] = chosenArray[2];
665 color[3] = 0;
666 m_MatColors.SetParam("ColorizationColor", color);
667 }
668 else
669 {
670 // no active event found, reset colorize effect
672 }
673 }

References m_ColorizeEffects, m_MatColors, and ResetColorize().

Referenced by SetColorizationNV().

◆ UpdateSaturation()

static void PPEffects::UpdateSaturation ( )
inlinestaticprivate

Definition at line 563 of file PPEffects.c.

564 {
565 m_MatColors.SetParam("Saturation", m_BloodSaturation/*+add_additional_modifiers_here*/);
566 }

References m_BloodSaturation, and m_MatColors.

Referenced by SetBloodSaturation().

◆ UpdateVignette()

static void PPEffects::UpdateVignette ( )
inlinestaticprivate

Definition at line 568 of file PPEffects.c.

569 {
570 float color[4];
571 float intesity;
572
573 float intensity_value_total = 0; //use just the highest?
575 {
576 for (int i = 0; i < m_VignetteEffects.Count(); ++i)
577 {
578 if (m_VignetteValues.Get(i))
579 {
580 /*color[0] = m_VignetteValues.Get(i)[1]; //red
581 color[1] = m_VignetteValues.Get(i)[2]; //green
582 color[2] = m_VignetteValues.Get(i)[3]; //blue
583 color[3] = m_VignetteValues.Get(i)[4]; //alpha*/
584 color[0] = m_VignetteValues.Get(i).Get(1); //red
585 color[1] = m_VignetteValues.Get(i).Get(2); //green
586 color[2] = m_VignetteValues.Get(i).Get(3); //blue
587 color[3] = m_VignetteValues.Get(i).Get(4); //alpha
588
589 intesity = m_VignetteValues.Get(i).Get(0);
591 }
592 else
593 {
594 //Print("no m_VignetteValues");
595 }
596 }
597 }
598
599 /*color[0] = m_UnconsciousVignetteColor[0];
600 color[1] = m_UnconsciousVignetteColor[1];
601 color[2] = m_UnconsciousVignetteColor[2];
602
603 intesity = m_UnconsciousVignetteIntesity;*/
604
606 }
static void SetVignette(float intensity, float R, float G, float B, float A)
Definition PPEffects.c:404

References m_VignetteEffects, m_VignetteValues, and SetVignette().

Referenced by ResetVignettes(), SetMenuVignette(), SetShockVignette(), SetTunnelVignette(), and SetUnconsciousnessVignette().

Member Data Documentation

◆ COLOR_SHOCK

const float PPEffects::COLOR_SHOCK = 0.1
staticprivate

Definition at line 8 of file PPEffects.c.

Referenced by SetShockEffectColor().

◆ COLORIZE_NV

const int PPEffects::COLORIZE_NV = 100
staticprivate

Definition at line 5 of file PPEffects.c.

Referenced by Init(), and SetColorizationNV().

◆ m_BloodSaturation

float PPEffects::m_BloodSaturation
staticprivate

Definition at line 33 of file PPEffects.c.

Referenced by SetBloodSaturation(), and UpdateSaturation().

◆ m_BlurDrunk

int PPEffects::m_BlurDrunk
staticprivate

Definition at line 14 of file PPEffects.c.

Referenced by Init(), and SetBlurDrunk().

◆ m_BlurFever

int PPEffects::m_BlurFever
staticprivate

Definition at line 15 of file PPEffects.c.

Referenced by Init(), and SetBlurFever().

◆ m_BlurFlashbang

int PPEffects::m_BlurFlashbang
staticprivate

Definition at line 18 of file PPEffects.c.

Referenced by Init(), and SetBlurFlashbang().

◆ m_BlurInventory

int PPEffects::m_BlurInventory
staticprivate

Definition at line 13 of file PPEffects.c.

Referenced by Init(), and SetBlurInventory().

◆ m_BlurMenu

int PPEffects::m_BlurMenu
staticprivate

Definition at line 16 of file PPEffects.c.

Referenced by Init(), and SetBlurMenu().

◆ m_BlurOptics

int PPEffects::m_BlurOptics
staticprivate

Definition at line 17 of file PPEffects.c.

Referenced by Init(), and SetBlurOptics().

◆ m_BlurShock

int PPEffects::m_BlurShock
staticprivate

Definition at line 19 of file PPEffects.c.

Referenced by SetBlurShock().

◆ m_BlurValues

ref array<float> PPEffects::m_BlurValues
staticprivate

Definition at line 35 of file PPEffects.c.

Referenced by Init(), RegisterBlurEffect(), ResetBlurEffects(), SetBlurValue(), and UpdateBlur().

◆ m_BurlapBlindness

int PPEffects::m_BurlapBlindness
staticprivate

Definition at line 21 of file PPEffects.c.

Referenced by DisableBurlapSackBlindness(), EnableBurlapSackBlindness(), and Init().

◆ m_ChromAbbOptic

int PPEffects::m_ChromAbbOptic
staticprivate

Definition at line 25 of file PPEffects.c.

Referenced by Init(), and SetChromAbbOptic().

◆ m_ChromAbbValues

ref array<float> PPEffects::m_ChromAbbValues
staticprivate

◆ m_ColorEffect

ref array<float> PPEffects::m_ColorEffect
staticprivate

Definition at line 40 of file PPEffects.c.

Referenced by Init(), RegisterColorEffect(), ResetColorEffects(), and SetColorValue().

◆ m_ColorizeEffects

ref map<int, ref array<float> > PPEffects::m_ColorizeEffects
staticprivate

Definition at line 41 of file PPEffects.c.

Referenced by Init(), SetColorizationNV(), and UpdateColorize().

◆ m_ColorOverlayTotal

float PPEffects::m_ColorOverlayTotal
staticprivate

Definition at line 47 of file PPEffects.c.

Referenced by UpdateColor().

◆ m_ColorValues

ref map<int, ref array<float> > PPEffects::m_ColorValues
staticprivate

Definition at line 39 of file PPEffects.c.

Referenced by Init(), ResetColorEffects(), SetColorValue(), and UpdateColor().

◆ m_ColorValueTotal

float PPEffects::m_ColorValueTotal[4] = {0, 0, 0, 0}
staticprivate

Definition at line 46 of file PPEffects.c.

46{0, 0, 0, 0};

Referenced by FlashbangEffect(), HitEffect(), and UpdateColor().

◆ m_DyingEffect

int PPEffects::m_DyingEffect
staticprivate

Definition at line 22 of file PPEffects.c.

Referenced by Init(), and SetDeathDarkening().

◆ m_MatColors

◆ m_RadialBlur

Material PPEffects::m_RadialBlur
staticprivate

Definition at line 50 of file PPEffects.c.

Referenced by Init(), and SetRadialBlur().

◆ m_ShockEffect

int PPEffects::m_ShockEffect
staticprivate

Definition at line 23 of file PPEffects.c.

Referenced by Init(), and SetShockEffectColor().

◆ m_VignetteEffects

ref array<int> PPEffects::m_VignetteEffects
staticprivate

Definition at line 37 of file PPEffects.c.

Referenced by Init(), RegisterVignetteEffect(), SetVignetteEffectValue(), and UpdateVignette().

◆ m_VignetteMenu

int PPEffects::m_VignetteMenu
staticprivate

Definition at line 31 of file PPEffects.c.

Referenced by Init(), and SetMenuVignette().

◆ m_VignetteShock

int PPEffects::m_VignetteShock
staticprivate

Definition at line 29 of file PPEffects.c.

Referenced by Init(), and SetShockVignette().

◆ m_VignetteTunnel

int PPEffects::m_VignetteTunnel
staticprivate

Definition at line 30 of file PPEffects.c.

Referenced by Init(), and SetTunnelVignette().

◆ m_VignetteUnconscious

int PPEffects::m_VignetteUnconscious
staticprivate

Definition at line 28 of file PPEffects.c.

Referenced by Init(), and SetUnconsciousnessVignette().

◆ m_VignetteValues

ref map<int, ref array<float> > PPEffects::m_VignetteValues
staticprivate

Definition at line 38 of file PPEffects.c.

Referenced by Init(), ResetVignettes(), SetVignetteEffectValue(), and UpdateVignette().


The documentation for this class was generated from the following file: