Dayz Explorer 1.28.160049
Loading...
Searching...
No Matches
ppercameraads_opt.c
Go to the documentation of this file.
1class 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
7 if (mask_array.Count() != 4)
8 {
9 mask_array = {0.0,0.0,0.0,0.0};
10 }
11 GetGame().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
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
34
35 //lens - no lens
37 SetTargetValueFloatDefault(PostProcessEffectType.Glow,PPEGlow.PARAM_MAXCHROMABBERATION);
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)
51 }
52
53 override protected void OnStop(Param par = null)
54 {
55 super.OnStop(par);
56
57 if ( !GetGame() )
58 return;
59
61 //material parameter values reset by default on stop
62 }
63}
proto native void ResetPPMask()
proto native void AddPPMask(float ndcX, float ndcY, float ndcRadius, float ndcBlur)
DOF postprocess, does not directly use materials.
Definition ppedof.c:6
GaussFilter - PostProcessEffectType.GaussFilter.
Glow - PostProcessEffectType.Glow.
Definition ppeglow.c:8
base, not to be used directly, would lead to layering collisions!
void OnStop(Param par=null)
Base Param Class with no parameters. Used as general purpose parameter overloaded with Param1 to Para...
Definition param.c:12
Result for an object found in CGame.IsBoxCollidingGeometryProxy.
proto native CGame GetGame()
PostProcessEffectType
Post-process effect type.
Definition enworld.c:72
PPOperators
PP operators, specify operation between subsequent layers.
PPEExceptions
void SetTargetValueBoolDefault(int mat_id, int param_idx)
void SetTargetValueBool(int mat_id, int param_idx, bool val, int priority_layer, int operator=PPOperators.SET)
void SetTargetValueFloatDefault(int mat_id, int param_idx)
void SetTargetValueFloat(int mat_id, int param_idx, bool relative, float val, int priority_layer, int operator=PPOperators.ADD_RELATIVE)