Dayz
Build 1.29.163047, Scripts Rev. 123548
Dayz Code Explorer by Zeroy
Toggle main menu visibility
Loading...
Searching...
No Matches
ppercameraads_opt.c
Go to the documentation of this file.
1
class
PPERequester_CameraADS
extends
PPERequester_GameplayBase
2
{
3
void
SetValuesOptics
(out
array<float>
mask_array, out
array<float>
lens_array,
float
gauss = 0.0)
4
{
5
//mask
6
g_Game
.ResetPPMask();
7
if
(mask_array.Count() != 4)
8
{
9
mask_array = {0.0,0.0,0.0,0.0};
10
}
11
g_Game
.AddPPMask(mask_array[0], mask_array[1], mask_array[2], mask_array[3]);
12
13
//lens
14
if
(lens_array.Count() != 4)
15
{
16
lens_array = {0.0,0.0,0.0,0.0};
17
}
18
SetTargetValueFloat
(
PostProcessEffectType
.Glow,
PPEGlow
.
PARAM_LENSDISTORT
,
false
,lens_array[0],
PPEGlow
.
L_27_ADS
,
PPOperators
.SET);
19
SetTargetValueFloat
(
PostProcessEffectType
.Glow,
PPEGlow
.
PARAM_MAXCHROMABBERATION
,
false
,lens_array[1],
PPEGlow
.
L_28_ADS
,
PPOperators
.SET);
20
SetTargetValueFloat
(
PostProcessEffectType
.Glow,
PPEGlow
.
PARAM_LENSCENTERX
,
false
,lens_array[2],
PPEGlow
.
L_29_ADS
,
PPOperators
.SET);
21
SetTargetValueFloat
(
PostProcessEffectType
.Glow,
PPEGlow
.
PARAM_LENSCENTERY
,
false
,lens_array[3],
PPEGlow
.
L_30_ADS
,
PPOperators
.SET);
22
23
//DOF - no DOF in optics
24
SetTargetValueBoolDefault
(
PPEExceptions
.DOF,
PPEDOF
.
PARAM_ENABLE
);
25
26
//blur
27
SetTargetValueFloat
(
PostProcessEffectType
.GaussFilter,
PPEGaussFilter
.
PARAM_INTENSITY
,
false
,gauss,
PPEGaussFilter
.
L_0_ADS
,
PPOperators
.ADD_RELATIVE);
28
}
29
30
void
SetValuesIronsights
(out
array<float>
DOF_array)
31
{
32
//mask - no mask
33
g_Game
.ResetPPMask();
34
35
//lens - no lens
36
SetTargetValueFloatDefault
(
PostProcessEffectType
.Glow,
PPEGlow
.
PARAM_LENSDISTORT
);
37
SetTargetValueFloatDefault
(
PostProcessEffectType
.Glow,
PPEGlow
.
PARAM_MAXCHROMABBERATION
);
38
SetTargetValueFloatDefault
(
PostProcessEffectType
.Glow,
PPEGlow
.
PARAM_LENSCENTERX
);
39
SetTargetValueFloatDefault
(
PostProcessEffectType
.Glow,
PPEGlow
.
PARAM_LENSCENTERY
);
40
41
//DOF
42
SetTargetValueBool
(
PPEExceptions
.DOF,
PPEDOF
.
PARAM_ENABLE
,DOF_array[0],
PPEDOF
.
L_0_ADS
,
PPOperators
.SET);
43
SetTargetValueFloat
(
PPEExceptions
.DOF,
PPEDOF
.
PARAM_FOCUS_DIST
,
false
,DOF_array[1],
PPEDOF
.
L_1_ADS
,
PPOperators
.SET);
44
SetTargetValueFloat
(
PPEExceptions
.DOF,
PPEDOF
.
PARAM_FOCUS_LEN
,
false
,DOF_array[2],
PPEDOF
.
L_2_ADS
,
PPOperators
.SET);
45
SetTargetValueFloat
(
PPEExceptions
.DOF,
PPEDOF
.
PARAM_FOCUS_LEN_NEAR
,
false
,DOF_array[3],
PPEDOF
.
L_3_ADS
,
PPOperators
.SET);
46
SetTargetValueFloat
(
PPEExceptions
.DOF,
PPEDOF
.
PARAM_BLUR
,
false
,DOF_array[4],
PPEDOF
.
L_4_ADS
,
PPOperators
.SET);
47
SetTargetValueFloat
(
PPEExceptions
.DOF,
PPEDOF
.
PARAM_FOCUS_DEPTH_OFFSET
,
false
,DOF_array[5],
PPEDOF
.
L_5_ADS
,
PPOperators
.SET);
48
49
//blur - no gauss blur (DOF bokeh only)
50
SetTargetValueFloatDefault
(
PostProcessEffectType
.GaussFilter,
PPEGaussFilter
.
PARAM_INTENSITY
);
51
}
52
53
override
protected
void
OnStop
(
Param
par = null)
54
{
55
super.OnStop(par);
56
57
if
( !
g_Game
)
58
return
;
59
60
g_Game
.ResetPPMask();
61
//material parameter values reset by default on stop
62
}
63
}
PPEDOF
DOF postprocess, does not directly use materials.
Definition
ppedof.c:6
PPEDOF::L_5_ADS
static const int L_5_ADS
Definition
ppedof.c:20
PPEDOF::PARAM_FOCUS_DIST
static const int PARAM_FOCUS_DIST
Definition
ppedof.c:9
PPEDOF::PARAM_ENABLE
static const int PARAM_ENABLE
Definition
ppedof.c:8
PPEDOF::PARAM_FOCUS_LEN
static const int PARAM_FOCUS_LEN
Definition
ppedof.c:10
PPEDOF::L_4_ADS
static const int L_4_ADS
Definition
ppedof.c:19
PPEDOF::L_2_ADS
static const int L_2_ADS
Definition
ppedof.c:17
PPEDOF::PARAM_FOCUS_DEPTH_OFFSET
static const int PARAM_FOCUS_DEPTH_OFFSET
Definition
ppedof.c:13
PPEDOF::L_0_ADS
static const int L_0_ADS
Definition
ppedof.c:15
PPEDOF::PARAM_FOCUS_LEN_NEAR
static const int PARAM_FOCUS_LEN_NEAR
Definition
ppedof.c:11
PPEDOF::L_1_ADS
static const int L_1_ADS
Definition
ppedof.c:16
PPEDOF::L_3_ADS
static const int L_3_ADS
Definition
ppedof.c:18
PPEDOF::PARAM_BLUR
static const int PARAM_BLUR
Definition
ppedof.c:12
PPEGaussFilter
GaussFilter - PostProcessEffectType.GaussFilter.
Definition
ppegaussfilter.c:3
PPEGaussFilter::L_0_ADS
static const int L_0_ADS
Definition
ppegaussfilter.c:6
PPEGaussFilter::PARAM_INTENSITY
static const int PARAM_INTENSITY
Definition
ppegaussfilter.c:4
PPEGlow
Glow - PostProcessEffectType.Glow.
Definition
ppeglow.c:8
PPEGlow::L_27_ADS
static const int L_27_ADS
Definition
ppeglow.c:69
PPEGlow::L_28_ADS
static const int L_28_ADS
Definition
ppeglow.c:71
PPEGlow::L_30_ADS
static const int L_30_ADS
Definition
ppeglow.c:75
PPEGlow::L_29_ADS
static const int L_29_ADS
Definition
ppeglow.c:73
PPEGlow::PARAM_LENSDISTORT
static const int PARAM_LENSDISTORT
Definition
ppeglow.c:36
PPEGlow::PARAM_MAXCHROMABBERATION
static const int PARAM_MAXCHROMABBERATION
Definition
ppeglow.c:37
PPEGlow::PARAM_LENSCENTERX
static const int PARAM_LENSCENTERX
Definition
ppeglow.c:38
PPEGlow::PARAM_LENSCENTERY
static const int PARAM_LENSCENTERY
Definition
ppeglow.c:39
PPERequester_GameplayBase
base, not to be used directly, would lead to layering collisions!
Definition
pperbloodloss.c:2
PPERequester_GameplayBase::OnStop
void OnStop(Param par=null)
Definition
ppercameraads_opt.c:53
PPERequester_GameplayBase::SetValuesOptics
void SetValuesOptics(out array< float > mask_array, out array< float > lens_array, float gauss=0.0)
Definition
ppercameraads_opt.c:3
PPERequester_GameplayBase::SetValuesIronsights
void SetValuesIronsights(out array< float > DOF_array)
Definition
ppercameraads_opt.c:30
Param
Base Param Class with no parameters.
Definition
param.c:12
array
Result for an object found in CGame.IsBoxCollidingGeometryProxy.
Definition
isboxcollidinggeometryproxyclasses.c:28
g_Game
DayZGame g_Game
Definition
dayzgame.c:3942
PostProcessEffectType
PostProcessEffectType
Post-process effect type.
Definition
enworld.c:72
PPOperators
PPOperators
PP operators, specify operation between subsequent layers.
Definition
ppeconstants.c:53
PPEExceptions
PPEExceptions
/brief IDs of custom PPE classes /note Currently used for various native exceptions that used to be h...
Definition
ppeconstants.c:43
SetTargetValueFloat
void SetTargetValueFloat(int mat_id, int param_idx, bool relative, float val, int priority_layer, int operator=PPOperators.ADD_RELATIVE)
Definition
pperequestplatformsbase.c:588
SetTargetValueBoolDefault
void SetTargetValueBoolDefault(int mat_id, int param_idx)
Definition
pperequestplatformsbase.c:533
SetTargetValueFloatDefault
void SetTargetValueFloatDefault(int mat_id, int param_idx)
Definition
pperequestplatformsbase.c:611
SetTargetValueBool
void SetTargetValueBool(int mat_id, int param_idx, bool val, int priority_layer, int operator=PPOperators.SET)
Definition
pperequestplatformsbase.c:511
Games
Dayz
scripts
3_game
ppemanager
requesters
ppercameraads_opt.c
Generated by
1.17.0