DayZ 1.27
DayZ Explorer by KGB
 
Загрузка...
Поиск...
Не найдено
PPEDOF.c
См. документацию.
1//---------------------------------------------------------
2//Native exceptions - legacy methods for direct access to specific postprocesses. Each one is evaluated and handled separately, this just connects them to the system.
3
6{
7 //g_Game.OverrideDOF(bool enable, float focusDistance, float focusLength, float focusLengthNear, float blur, float focusDepthOffset);
8 static const int PARAM_ENABLE = 0;
9 static const int PARAM_FOCUS_DIST = 1;
10 static const int PARAM_FOCUS_LEN = 2;
11 static const int PARAM_FOCUS_LEN_NEAR = 3;
12 static const int PARAM_BLUR = 4;
13 static const int PARAM_FOCUS_DEPTH_OFFSET = 5;
14
15 static const int L_0_ADS = 100;
16 static const int L_1_ADS = 100;
17 static const int L_2_ADS = 100;
18 static const int L_3_ADS = 100;
19 static const int L_4_ADS = 100;
20 static const int L_5_ADS = 100;
21
23 {
24 return PPEExceptions.DOF;
25 }
26
28 {
29 //no known max. 1000 used as max
31
32 RegisterParameterScalarFloat(PARAM_FOCUS_DIST,"FocusDistance",2.0,0.0,1000.0); //2.0f used in code with null camera interpolation
33 RegisterParameterScalarFloat(PARAM_FOCUS_LEN,"FocusLength",-1.0,-1.0,1000.0); //-1.0f used as code default
34 RegisterParameterScalarFloat(PARAM_FOCUS_LEN_NEAR,"FocusLengthNear",-1.0,-1.0,1000.0); //-1.0f used as code default
35 RegisterParameterScalarFloat(PARAM_BLUR,"Blur",1.0,0.0,1000.0); //1.0f used in code with null camera interpolation
36 RegisterParameterScalarFloat(PARAM_FOCUS_DEPTH_OFFSET,"FocusDepthOffset",0.0,0.0,1000.0); //0.0f used as code default
37 }
38
39 override void ApplyValueChanges()
40 {
41 if (m_UpdatedParameters.Count() > 0)
42 {
43 SetFinalParameterValue(-1); //unique handling
44 }
45
46 m_UpdatedParameters.Clear();
47 }
48
50 override void SetFinalParameterValue(int parameter_idx)
51 {
53 bool is_enabled = Param1<bool>.Cast(enabled_par).param1;
54
55 if (is_enabled)
56 {
57 array<float> array_values = {-1.0};
58
59 for (int i = 1; i < PARAM_FOCUS_DEPTH_OFFSET + 1; i++)
60 {
62 float value_var_float = Param1<float>.Cast(values).param1;
63 array_values.Insert(value_var_float);
64 }
65
66 g_Game.OverrideDOF(true, array_values.Get(PARAM_FOCUS_DIST), array_values.Get(PARAM_FOCUS_LEN), array_values.Get(PARAM_FOCUS_LEN_NEAR), array_values.Get(PARAM_BLUR), array_values.Get(PARAM_FOCUS_DEPTH_OFFSET));
67 }
68 else
69 {
70 g_Game.OverrideDOF(false,0.0,0.0,0.0,0.0,1.0);
71 }
72 }
73}
DayZGame g_Game
Определения DayZGame.c:3868
PPEExceptions
Определения PPEConstants.c:43
void RegisterParameterScalarFloat(int idx, string parameter_name, float default_value, float min, float max)
WARNING - min/max values are usually taken from Workbench defaults, may not be actual min/max values ...
Определения PPEMatClassesBase.c:77
void RegisterParameterScalarBool(int idx, string parameter_name, bool default_value)
Определения PPEMatClassesBase.c:59
PPEMatClassParameterCommandData GetParameterCommandData(int parameter_idx)
Some PP effects are handled as hard-coded exceptions, outside of material system. Default == PPEExcep...
Определения PPEMatClassesBase.c:350
ref array< int > m_UpdatedParameters
Определения PPEMatClassesBase.c:10
void PPEClassBase(string mat_path_override="")
Определения PPEMatClassesBase.c:14
static const int L_5_ADS
Определения PPEDOF.c:20
static const int L_1_ADS
Определения PPEDOF.c:16
override int GetPostProcessEffectID()
Определения PPEDOF.c:22
static const int PARAM_FOCUS_LEN
Определения PPEDOF.c:10
static const int L_4_ADS
Определения PPEDOF.c:19
static const int L_3_ADS
Определения PPEDOF.c:18
static const int PARAM_FOCUS_LEN_NEAR
Определения PPEDOF.c:11
static const int PARAM_FOCUS_DIST
Определения PPEDOF.c:9
static const int PARAM_BLUR
Определения PPEDOF.c:12
static const int PARAM_FOCUS_DEPTH_OFFSET
Определения PPEDOF.c:13
override void ApplyValueChanges()
Определения PPEDOF.c:39
static const int L_0_ADS
Определения PPEDOF.c:15
static const int L_2_ADS
Определения PPEDOF.c:17
static const int PARAM_ENABLE
Определения PPEDOF.c:8
override void SetFinalParameterValue(int parameter_idx)
Overriden to handle the specific exception.
Определения PPEDOF.c:50
override void RegisterMaterialParameters()
Определения PPEDOF.c:27
DOF postprocess, does not directly use materials.
Определения PPEDOF.c:6
Param GetCurrentValues()
Careful, only actual values, WITHOUT string.
T1 param1
Определения param.c:34
Base Param Class with no parameters. Used as general purpose parameter overloaded with Param1 to Para...
Определения param.c:12
Result for an object found in CGame.IsBoxCollidingGeometryProxy.