ppeglow.c 5.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127
  1. /*enum PPEGlow
  2. {
  3. PARAM_VISIBLEPERCENT = 0,
  4. }*/
  5. //!Glow - PostProcessEffectType.Glow
  6. class PPEGlow: PPEClassBase
  7. {
  8. static const int PARAM_VISIBLEPERCENT = 0;
  9. static const int PARAM_TARGETBRIGHTNESS = 1;
  10. static const int PARAM_SPEEDDARKTOBRIGHT = 2;
  11. static const int PARAM_SPEEDBRIGHTTODARK = 3;
  12. static const int PARAM_TONEMAPPING = 4;
  13. static const int PARAM_HDR = 5;
  14. static const int PARAM_FILMICSHOULDERSTRENGTH = 6;
  15. static const int PARAM_FILMICLINEARSTRENGTH = 7;
  16. static const int PARAM_FILMICLINEARANGLE = 8;
  17. static const int PARAM_FILMICTOESTRENGTH = 9;
  18. static const int PARAM_FILMICTOENUMERATOR = 10;
  19. static const int PARAM_FILMICTOEDENUMERATOR = 11;
  20. static const int PARAM_FILMICEXPOSUREBIAS = 12;
  21. static const int PARAM_FILMICWHITEPOINT = 13;
  22. static const int PARAM_BLOOMTHRESHOLD = 14;
  23. static const int PARAM_BLOOMSTEEPNESS = 15;
  24. static const int PARAM_BLOOMINTENSITY = 16;
  25. static const int PARAM_BRIGHTNESS = 17;
  26. static const int PARAM_CONTRAST = 18;
  27. static const int PARAM_OFFSET = 19;
  28. static const int PARAM_OVERLAYFACTOR = 20;
  29. static const int PARAM_OVERLAYCOLOR = 21;
  30. static const int PARAM_SATURATION = 22;
  31. static const int PARAM_COLORIZATIONCOLOR = 23;
  32. static const int PARAM_DESATURATIONWEIGHTS = 24;
  33. static const int PARAM_VIGNETTE = 25;
  34. static const int PARAM_VIGNETTECOLOR = 26;
  35. static const int PARAM_LENSDISTORT = 27;
  36. static const int PARAM_MAXCHROMABBERATION = 28;
  37. static const int PARAM_LENSCENTERX = 29;
  38. static const int PARAM_LENSCENTERY = 30;
  39. //layer info
  40. static const int L_20_HIT = 100;
  41. static const int L_20_FLASHBANG = 300;
  42. static const int L_20_SHOCK = 500;
  43. static const int L_21_SHOCK = 100;
  44. static const int L_21_HIT = 300;
  45. static const int L_21_FLASHBANG = 500;
  46. static const int L_22_BLOODLOSS = 100;
  47. static const int L_23_GLASSES = 100;
  48. static const int L_23_TOXIC_TINT = 200;
  49. static const int L_23_HMP = 300;
  50. static const int L_23_NVG = 600;
  51. static const int L_25_MENU = 100;
  52. static const int L_25_TUNNEL = 300;
  53. static const int L_25_SHOCK = 500;
  54. static const int L_25_UNCON = 700;
  55. static const int L_25_BURLAP = 800;
  56. static const int L_26_MENU = 100;
  57. static const int L_26_TUNNEL = 300;
  58. static const int L_26_SHOCK = 500;
  59. static const int L_26_UNCON = 700;
  60. static const int L_26_BURLAP = 800;
  61. static const int L_27_ADS = 100;
  62. static const int L_28_ADS = 100;
  63. static const int L_29_ADS = 100;
  64. static const int L_30_ADS = 100;
  65. override int GetPostProcessEffectID()
  66. {
  67. return PostProcessEffectType.Glow;
  68. }
  69. override string GetDefaultMaterialPath()
  70. {
  71. return "Graphics/Materials/postprocess/glow";
  72. }
  73. override void RegisterMaterialParameters()
  74. {
  75. //HDR
  76. RegisterParameterScalarFloat(PARAM_VISIBLEPERCENT,"VisiblePercent",95,1,100);
  77. RegisterParameterScalarFloat(PARAM_TARGETBRIGHTNESS,"TargetBrightness",0.3,0.01,1);
  78. RegisterParameterScalarFloat(PARAM_SPEEDDARKTOBRIGHT,"SpeedDarkToBright",0.3,0.01,1);
  79. RegisterParameterScalarFloat(PARAM_SPEEDBRIGHTTODARK,"SpeedBrightToDark",0.3,0.01,1);
  80. RegisterParameterScalarInt(PARAM_TONEMAPPING,"ToneMapping",2,0,2);
  81. RegisterParameterScalarBool(PARAM_HDR,"HDR",1);
  82. //Filmic tonemapping
  83. RegisterParameterScalarFloat(PARAM_FILMICSHOULDERSTRENGTH,"FilmicShoulderStrength",0.153,0,1);
  84. RegisterParameterScalarFloat(PARAM_FILMICLINEARSTRENGTH,"FilmicLinearStrength",0.357,-1,1);
  85. RegisterParameterScalarFloat(PARAM_FILMICLINEARANGLE,"FilmicLinearAngle",0.231,-1,1);
  86. RegisterParameterScalarFloat(PARAM_FILMICTOESTRENGTH,"FilmicToeStrength",0.1573,0.001,3);
  87. RegisterParameterScalarFloat(PARAM_FILMICTOENUMERATOR,"FilmicToeNumerator",0.011,-1,1);
  88. RegisterParameterScalarFloat(PARAM_FILMICTOEDENUMERATOR,"FilmicToeDenumerator",3.75,0.1,20);
  89. RegisterParameterScalarFloat(PARAM_FILMICEXPOSUREBIAS,"FilmicExposureBias",4.0,0.1,20);
  90. RegisterParameterScalarFloat(PARAM_FILMICWHITEPOINT,"FilmicWhitePoint",1.5,0.1,20);
  91. //Bloom
  92. RegisterParameterScalarFloat(PARAM_BLOOMTHRESHOLD,"BloomThreshold",0.5,0,1);
  93. RegisterParameterScalarFloat(PARAM_BLOOMSTEEPNESS,"BloomSteepness",1,0,10);
  94. RegisterParameterScalarFloat(PARAM_BLOOMINTENSITY,"BloomIntensity",1,0,4);
  95. //Color modificators
  96. //color defines
  97. RegisterParameterScalarFloat(PARAM_BRIGHTNESS,"Brightness",1,0,2);
  98. RegisterParameterScalarFloat(PARAM_CONTRAST,"Contrast",1,0,2);
  99. RegisterParameterScalarFloat(PARAM_OFFSET,"Offset",0,-1,1);
  100. RegisterParameterScalarFloat(PARAM_OVERLAYFACTOR,"OverlayFactor",0,0,1);
  101. RegisterParameterColor(PARAM_OVERLAYCOLOR,"OverlayColor",1,1,1,0);
  102. RegisterParameterScalarFloatEx(PARAM_SATURATION,"Saturation",1,0,1,PPEMatClassParameterFloatSaturation);
  103. RegisterParameterColorEx(PARAM_COLORIZATIONCOLOR,"ColorizationColor",1.0,1.0,1.0,0.0,PPEMatClassParameterColorColorization);
  104. RegisterParameterVector(PARAM_DESATURATIONWEIGHTS,"DesaturationWeights",{0.299,0.587,0.114,0});
  105. RegisterParameterScalarFloat(PARAM_VIGNETTE,"Vignette",0,0,2); //C++ maximum is set to 1.0 (Workbench), but the parameter can accept more. 2.0 is a reasonable value
  106. RegisterParameterColor(PARAM_VIGNETTECOLOR,"VignetteColor",0,0,0,0);
  107. //Distort
  108. RegisterParameterScalarFloat(PARAM_LENSDISTORT,"LensDistort",0,-5,5);
  109. RegisterParameterScalarFloat(PARAM_MAXCHROMABBERATION,"MaxChromAbberation",0,0,1);
  110. RegisterParameterScalarFloat(PARAM_LENSCENTERX,"LensCenterX",0,-1,1);
  111. RegisterParameterScalarFloat(PARAM_LENSCENTERY,"LensCenterY",0,-1,1);
  112. }
  113. }