DayZ 1.30
DayZ Explorer by KGB
 
Загрузка...
Поиск...
Не найдено
PPERSandstorm.c
См. документацию.
2{
3 protected const float SANDSTORM_THRESHOLD_MIN = 0.20;
4 protected const float SANDSTORM_THRESHOLD_MAX = 1.0;
5 protected const float SANDSTORM_INTENSITY_MIN = 0;
6 protected const float SANDSTORM_INTENSITY_MAX = 1.0;
7 protected const float SANDSTORM_INTENSITY_BLEND_POWER = 0.25;
8
9 protected static const float EFFECT_TRANSITION_SPEED = 1.0;
10 protected static const float EFFECT_STEP_DELTA = 0.016;
12
14 protected const vector SANDSTORM_COLOR_LIGHT = "1.0 0.80 0.5";
15 protected const vector SANDSTORM_COLOR_HEAVY = "1.0 0.85 0.6";
16 protected const float MIN_SANDSTORM_COLOR_ALPHA = 0.2;
17 protected const float MAX_SANDSTORM_COLOR_ALPHA = 0.5;
18
20 protected const float SANDSTORM_SATURATION_MIN = 1.0;
21 protected const float SANDSTORM_SATURATION_MAX = 0.78;
22
24 protected const float SANDSTORM_CONTRAST_MIN = 1.0;
25 protected const float SANDSTORM_CONTRAST_MAX = 0.92;
26
28 protected const float SANDSTORM_BRIGHTNESS_MIN = 1.0;
29 protected const float SANDSTORM_BRIGHTNESS_MAX = 0.97;
30
32 protected const float SANDSTORM_GODRAYS_MIN = 0;
33 protected const float SANDSTORM_GODRAYS_MAX = 0.10;
34
35 protected const float SANDSTORM_SUN_VISIBILITY_MIN = 0.5;
36 protected const float SANDSTORM_SUN_VISIBILITY_MAX = 0.35;
37
38 protected const float SANDSTORM_GODRAYS_OVERBURN_MIN = 0;
39 protected const float SANDSTORM_GODRAYS_OVERBURN_MAX = 0.05;
40
42 protected float m_CurrentIntensity = 0.0;
43 protected float m_TargetIntensity = 0.0;
44
45 protected float m_EffectPhase = 0.0;
46 protected float m_WindFrequency = 0.8;
47
50
51 protected float m_SandstormBlend;
52
53 protected World m_World;
54
55 override protected void OnStart(Param par = null)
56 {
57 super.OnStart(par);
58
59 m_World = g_Game.GetWorld();
62
65
66 g_Game.GetCallQueue(CALL_CATEGORY_SYSTEM).CallLater(UpdateEffect, 16, true);
67 }
68
69 override protected void OnStop(Param par = null)
70 {
71 super.OnStop(par);
72
73 g_Game.GetCallQueue(CALL_CATEGORY_SYSTEM).Remove(UpdateEffect);
74
77 }
78
83
100
101 protected bool ShouldUpdateEffect()
102 {
104 }
105
106 protected float GetSandstormBlend(float intensity)
107 {
108 if (intensity <= SANDSTORM_THRESHOLD_MIN)
110
114 }
115
116 protected void ProcessEffect(float intensity)
117 {
119
120 vector currentHSV;
124 currentHSV[1] = Math.Min(1.0, currentHSV[1] * (1.0 + m_SandstormBlend * 0.3));
125
126 vector currentColor = HSVToRGB(currentHSV);
127 float colorPower = Math.Pow(m_SandstormBlend, 1.3);
128 float red = Math.Lerp(0.0, currentColor[0] - 1.0, colorPower);
129 float green = Math.Lerp(0.0, currentColor[1] - 1.0, colorPower);
130 float blue = Math.Lerp(0.0, currentColor[2] - 1.0, colorPower);
132
137
141 }
142}
DayZGame g_Game
Определения DayZGame.c:4074
PPOperators
PP operators, specify operation between subsequent layers.
Определения PPEConstants.c:53
void SetTargetValueFloat(int mat_id, int param_idx, bool relative, float val, int priority_layer, int operator=PPOperators.ADD_RELATIVE)
Определения PPERequestPlatformsBase.c:588
void SetTargetValueColor(int mat_id, int param_idx, array< float > val, int priority_layer, int operator=PPOperators.ADD_RELATIVE)
Определения PPERequestPlatformsBase.c:630
Определения EnMath.c:7
static const int PARAM_SATURATION
Определения PPEGlow.c:31
static const int PARAM_COLORIZATIONCOLOR
Определения PPEGlow.c:32
static const int PARAM_CONTRAST
Определения PPEGlow.c:27
static const int PARAM_BRIGHTNESS
Определения PPEGlow.c:26
static const int L_20_SANDSTORM
Определения PPEGlow.c:42
Glow - PostProcessEffectType.Glow.
Определения PPEGlow.c:8
static const int L_0_SANDSTORM
Определения PPEGodRays.c:12
static const int PARAM_INTENSITY
Определения PPEGodRays.c:4
static const int PARAM_SUNVISIBLE
Определения PPEGodRays.c:5
static const int PARAM_OVERBURNINTENSITY
Определения PPEGodRays.c:6
GodRays - PostProcessEffectType.GodRays.
Определения PPEGodRays.c:3
base, not to be used directly, would lead to layering collisions!
Определения PPERBloodLoss.c:2
const float SANDSTORM_SATURATION_MAX
Определения PPERSandstorm.c:21
float m_SandstormBlend
Определения PPERSandstorm.c:51
float GetSandstormBlend(float intensity)
Определения PPERSandstorm.c:106
const float SANDSTORM_CONTRAST_MIN
GLOW CONTRAST.
Определения PPERSandstorm.c:24
const float SANDSTORM_INTENSITY_MAX
Определения PPERSandstorm.c:6
void UpdateEffect()
Определения PPERSandstorm.c:84
const float SANDSTORM_GODRAYS_MIN
GODRAYS.
Определения PPERSandstorm.c:32
void OnStart(Param par=null)
Определения PPERSandstorm.c:55
const float EFFECT_STEP
Определения PPERSandstorm.c:11
void OnStop(Param par=null)
Определения PPERSandstorm.c:69
const float SANDSTORM_INTENSITY_MIN
Определения PPERSandstorm.c:5
static const float EFFECT_TRANSITION_SPEED
Определения PPERSandstorm.c:9
const float MAX_SANDSTORM_COLOR_ALPHA
Определения PPERSandstorm.c:17
const float MIN_SANDSTORM_COLOR_ALPHA
Определения PPERSandstorm.c:16
const float SANDSTORM_THRESHOLD_MIN
Определения PPERSandstorm.c:3
const float SANDSTORM_BRIGHTNESS_MIN
GLOW BRIGHTNESS.
Определения PPERSandstorm.c:28
static const float EFFECT_STEP_DELTA
Определения PPERSandstorm.c:10
bool ShouldUpdateEffect()
Определения PPERSandstorm.c:101
void SetTargetIntensity(float intensity)
Определения PPERSandstorm.c:79
const vector SANDSTORM_COLOR_HEAVY
Определения PPERSandstorm.c:15
float m_CurrentIntensity
Utility.
Определения PPERSandstorm.c:42
float m_WindFrequency
Определения PPERSandstorm.c:46
const float SANDSTORM_GODRAYS_MAX
Определения PPERSandstorm.c:33
vector m_SandstormColorLightHSV
Определения PPERSandstorm.c:48
const float SANDSTORM_GODRAYS_OVERBURN_MIN
Определения PPERSandstorm.c:38
vector m_SandstormColorHeavyHSV
Определения PPERSandstorm.c:49
const float SANDSTORM_GODRAYS_OVERBURN_MAX
Определения PPERSandstorm.c:39
const float SANDSTORM_INTENSITY_BLEND_POWER
Определения PPERSandstorm.c:7
const float SANDSTORM_CONTRAST_MAX
Определения PPERSandstorm.c:25
const float SANDSTORM_THRESHOLD_MAX
Определения PPERSandstorm.c:4
const float SANDSTORM_SUN_VISIBILITY_MAX
Определения PPERSandstorm.c:36
const float SANDSTORM_BRIGHTNESS_MAX
Определения PPERSandstorm.c:29
void ProcessEffect(float intensity)
Определения PPERSandstorm.c:116
float m_EffectPhase
Определения PPERSandstorm.c:45
const float SANDSTORM_SATURATION_MIN
GLOW SATURATION.
Определения PPERSandstorm.c:20
float m_TargetIntensity
Определения PPERSandstorm.c:43
const vector SANDSTORM_COLOR_LIGHT
GLOW COLOR.
Определения PPERSandstorm.c:14
const float SANDSTORM_SUN_VISIBILITY_MIN
Определения PPERSandstorm.c:35
Base Param Class with no parameters. Used as general purpose parameter overloaded with Param1 to Para...
Определения param.c:12
Определения World.c:2
Определения EnConvert.c:119
PostProcessEffectType
Post-process effect type.
Определения EnWorld.c:72
static proto float Max(float x, float y)
Returns bigger of two given values.
static proto float Lerp(float a, float b, float time)
Linearly interpolates between 'a' and 'b' given 'time'.
static proto float Min(float x, float y)
Returns smaller of two given values.
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'.
static proto float InverseLerp(float a, float b, float value)
Calculates the linear value that produces the interpolant value within the range [a,...
static proto float Pow(float v, float power)
Return power of v ^ power.
const int CALL_CATEGORY_SYSTEM
Определения 3_Game/DayZ/tools/tools.c:8
static vector HSVToRGB(vector hsv)
Определения proto.c:403
static vector RGBToHSV(vector rgb)
Определения proto.c:362