145 Print(
"Error: PPEffects: m_BlurValues with index: "+ index +
" is not registered.");
156 static void SetRadialBlur(
float powerX,
float powerY,
float offsetX,
float offsetY )
176 mat_blur.
SetParam(
"Intensity", value);
184 float blur_value_total = 0;
280 Print(
"Error: PPEffects: m_ChromAbbValues with index: "+ index +
" is not registered.");
300 float chromabb_value_total = 0;
356 static void SetColorValue(
int index,
float r,
float g,
float b,
float a,
float overlay)
366 Print(
"Error: PPEffects: m_ColorValues with index: "+ index +
" is not registered.");
377 float color_value_total[4] = {0,0,0,0};
393 color_value_total[0] = color_value_total[0] + value[0];
394 color_value_total[1] = color_value_total[1] + value[1];
395 color_value_total[2] = color_value_total[2] + value[2];
396 color_value_total[3] = color_value_total[3] + value[3];
397 color_overlay += value[4];
402 m_MatColors.SetParam(
"OverlayColor", color_value_total);
403 m_MatColors.SetParam(
"OverlayFactor", color_overlay);
413 static void SetLensEffect(
float lens,
float chromAbb,
float centerX,
float centerY)
456 Print(
"Error: PPEffects: m_ColorValues with index: "+ index +
" is not registered.");
503 static void OverrideDOF(
bool enable,
float focusDistance,
float focusLength,
float focusLengthNear,
float blur,
float focusDepthOffset)
505 GetGame().
OverrideDOF(enable, focusDistance, focusLength, focusLengthNear, blur, focusDepthOffset);
508 static void AddPPMask(
float ndcX,
float ndcY,
float ndcRadius,
float ndcBlur)
530 float m_HitEffectColor[4];
532 m_HitEffectColor[1] = 0;
533 m_HitEffectColor[2] = 0;
545 m_MatColors.SetParam(
"OverlayColor", m_HitEffectColor);
560 float hitEffectColor[4];
561 hitEffectColor[0] = 1;
562 hitEffectColor[1] = 1;
563 hitEffectColor[2] = 1;
566 m_MatColors.SetParam(
"OverlayColor", hitEffectColor);
605 float intensity_value_total = 0;
622 intensity_value_total += intesity;
637 SetVignette( intensity_value_total, color[0], color[1], color[2], color[3] );
668 bool foundActiveEffect =
false;
669 int lowestKey = 1000000;
677 for (
int j = 0; j < colorizeValues.Count(); j++)
679 if (colorizeValues[j] != 0.0)
681 if (currentKey < lowestKey)
683 chosenArray = colorizeValues;
684 lowestKey = currentKey;
685 foundActiveEffect =
true;
691 if (foundActiveEffect)
694 color[0] = chosenArray[0];
695 color[1] = chosenArray[1];
696 color[2] = chosenArray[2];
724 static void SetNVParams(
float light_mult,
float noise_intensity,
float sharpness,
float grain_size)
731 g_Game.NightVissionLightParams(light_mult, noise_intensity);
732 matHDR.
SetParam(
"Sharpness", sharpness);
733 matHDR.
SetParam(
"GrainSize", grain_size);
737 static void SetBloom(
float thres,
float steep,
float inten)
proto native void ResetPPMask()
proto native void AddPPMask(float ndcX, float ndcY, float ndcRadius, float ndcBlur)
proto native World GetWorld()
proto native void OverrideDOF(bool enable, float focusDistance, float focusLength, float focusLengthNear, float blur, float focusDepthOffset)
proto bool SetParam(string propertyName, void value)
static void ResetVignettes()
static void SetChromAbbValue(int index, float value)
static int RegisterVignetteEffect()
static ref map< int, ref array< float > > m_VignetteValues
static void AddPPMask(float ndcX, float ndcY, float ndcRadius, float ndcBlur)
static void ResetDOFOverride()
static void SetColorizationNV(float r, float g, float b)
static void SetNVParams(float light_mult, float noise_intensity, float sharpness, float grain_size)
static void ResetRadialBlur()
static void ResetBlurEffects()
static void ResetPPMask()
static ref array< int > m_VignetteEffects
static float m_BloodSaturation
static void SetUnconsciousnessVignette(float value)
static Material m_MatColors
static void SetVignette(float intensity, float R, float G, float B, float A)
static const int COLORIZE_NV
static void SetMenuVignette(float value)
static void SetLensEffect(float lens, float chromAbb, float centerX, float centerY)
static void SetBlur(float value)
sets blur effect to an absolute value between 0..1
static void OverrideDOF(bool enable, float focusDistance, float focusLength, float focusLengthNear, float blur, float focusDepthOffset)
static int m_VignetteMenu
static void SetBlurFlashbang(float value)
Set blur flashbang hit effect to a specified 'value' between 0..1.
static int m_VignetteShock
static int RegisterBlurEffect()
static void ResetColorize()
static void UpdateColorize()
static int m_BlurFlashbang
static void SetBlurInventory(float value)
Set blur inventory effect to a specified 'value' between 0..1.
static void SetBloodSaturation(float value)
static void SetShockVignette(float value)
static float m_ColorValueTotal[4]
static void UpdateColor()
static void SetShockEffectColor(float value)
static void SetVignetteEffectValue(int index, float intensity, float r, float g, float b, float a)
static ref array< float > m_ColorEffect
static void SetBlurValue(int index, float value)
static void UpdateBlur()
updates the blur post process effect where the resulting blur is an aggregate of all individual blur ...
static int m_BurlapBlindness
static void DisableBurlapSackBlindness()
static void SetBloom(float thres, float steep, float inten)
static int RegisterColorEffect()
static ref map< int, ref array< float > > m_ColorizeEffects
static void SetEVValuePP(float value)
static void UpdateVignette()
static void SetChromAbbOptic(float value)
static void SetBlurOptics(float value)
Set optics and ironsights blur to a specified 'value' between 0..1.
static Material m_RadialBlur
static ref array< float > m_ChromAbbValues
static int m_ChromAbbOptic
static void HitEffect(float value)
static void SetBlurDrunk(float value)
Set blur drunk effect to a specified 'value' between 0..1.
static void ResetLensEffect()
static void SetBlurShock(float value)
static void ResetColorEffects()
static int m_VignetteTunnel
static int RegisterChromAbbEffect()
static void SetColorValue(int index, float r, float g, float b, float a, float overlay)
static int m_VignetteUnconscious
static void SetDeathDarkening(float value)
static void PerformSetLensEffect(float lens, float chromAbb, float centerX, float centerY)
added for convenience
static ref array< float > m_BlurValues
static void FlashbangEffect(float value)
static float m_ColorOverlayTotal
static void EnableBurlapSackBlindness()
static void SetBlurFever(float value)
Set blur drunk effect to a specified 'value' between 0..1.
static void UpdateChromAbb()
updates the chromatic abberation post process effect where the resulting chromabb is an aggregate of ...
static void SetChromAbb(float value)
static void UpdateSaturation()
static const float COLOR_SHOCK
static ref map< int, ref array< float > > m_ColorValues
static void ResetChromAbbEffects()
static void SetTunnelVignette(float value)
static void SetBlurMenu(float value)
Set menu blur to a specified 'value' between 0..1.
static int m_BlurInventory
static void SetRadialBlur(float powerX, float powerY, float offsetX, float offsetY)
sets blur effect to an absolute value between 0..1
Deprecated; 'PPEManager' used instead.
proto native Material GetMaterial(string materialName)
Result for an object found in CGame.IsBoxCollidingGeometryProxy.
proto native CGame GetGame()
proto void Print(void var)
Prints content of variable to console/log.
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'.