Dayz Explorer 1.28.160049
Loading...
Searching...
No Matches
ppedistort.c
Go to the documentation of this file.
1
3{
4 static const int PARAM_DISTORT = 0;
5 static const int PARAM_CENTERX = 1;
6 static const int PARAM_CENTERY = 2;
7 static const int PARAM_CHROM_ABB = 3;
8 static const int PARAM_CHROM_ABB_SHIFTR = 4;
9 static const int PARAM_CHROM_ABB_SHIFTG = 5;
10 static const int PARAM_CHROM_ABB_SHIFTB = 6;
11 static const int PARAM_CHROM_COLOR_MOD = 7;
12 static const int PARAM_DISTORT_WEIGHT = 8;
13
14 //layering info
15 static const int L_0_HMP = 100;
16 static const int L_1_HMP = 100;
17 static const int L_2_HMP = 100;
18 static const int L_3_HMP = 100;
19 static const int L_4_HMP = 100;
20 static const int L_5_HMP = 100;
21 static const int L_6_HMP = 100;
22 static const int L_7_HMP = 100;
23
24 override int GetPostProcessEffectID()
25 {
26 return PostProcessEffectType.Distort;
27 }
28
29 override string GetDefaultMaterialPath()
30 {
31 return "Graphics/Materials/postprocess/distort";
32 }
33
34 override void RegisterMaterialParameters()
35 {
36 RegisterParameterScalarFloat(PARAM_DISTORT, "Distort", 0, -5, 5);
37 RegisterParameterScalarFloat(PARAM_CENTERX, "CenterX", 0, -1, 1);
38 RegisterParameterScalarFloat(PARAM_CENTERY, "CenterY", 0, -1, 1);
39 RegisterParameterScalarFloat(PARAM_CHROM_ABB, "MaxChromAbberation", 0, 0, 1);
40 RegisterParameterScalarFloat(PARAM_CHROM_ABB_SHIFTR, "ChromAbberationShiftR", 0, -2, 2);
41 RegisterParameterScalarFloat(PARAM_CHROM_ABB_SHIFTG, "ChromAbberationShiftG", 1, -2, 2);
42 RegisterParameterScalarFloat(PARAM_CHROM_ABB_SHIFTB, "ChromAbberationShiftB", 2, -2, 2);
43 RegisterParameterColor(PARAM_CHROM_COLOR_MOD, "ModulateColor", 0, 0, 0, 0);
44 RegisterParameterScalarFloat(PARAM_DISTORT_WEIGHT, "DistortWeight", 1.0, 0.0, 1.0);
45 }
46}
Created once, on manager init. Script-side representation of C++ material class, separate handling.
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 ...
void RegisterParameterColor(int idx, string parameter_name, float r, float g, float b, float a)
WARNING - min/max values are usually taken from Workbench defaults, may not be actual min/max values ...
Distort - PostProcessEffectType.Distort.
Definition ppedistort.c:3
PostProcessEffectType
Post-process effect type.
Definition enworld.c:72