ppeconstants.c 3.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192
  1. //! PPE type priorities, C++ based. DO NOT CHANGE ORDER! Used only when calling 'SetCameraPostProcessEffect'
  2. enum PostProcessPrioritiesCamera
  3. {
  4. PPP_SSAO,
  5. PPP_CLOUDS,
  6. PPP_DOF,
  7. PPP_ROTBLUR,
  8. PPP_GODRAYS,
  9. PPP_RAIN,
  10. PPP_RADIALBLUR,
  11. PPP_CHROMABER,
  12. PPP_WETDISTORT,
  13. PPP_DYNBLUR,
  14. PPP_UNDERWATER,
  15. PPP_DOF_BOKEH,
  16. PPP_COLORGRADE,
  17. PPP_GLOW,
  18. PPP_FILMGRAIN,
  19. PPP_FILMGRAIN_NV,
  20. PPP_FXAA,
  21. PPP_SMAA,
  22. PPP_GAUSS_FILTER,
  23. PPP_MEDIAN, //unused?
  24. //PPP_SSR
  25. PPP_DISTORT,
  26. };
  27. enum PPERequesterCategory
  28. {
  29. NONE = 0;
  30. GAMEPLAY_EFFECTS = 2;
  31. MENU_EFFECTS = 4;
  32. MISC_EFFECTS = 8;
  33. ALL = 14; //GAMEPLAY_EFFECTS|MENU_EFFECTS|MISC_EFFECTS
  34. };
  35. /**
  36. /brief IDs of custom PPE classes
  37. /note Currently used for various native exceptions that used to be handled outside of script-side postprocess system.
  38. /note Can be used for custom functionality as well, C++ permitting.
  39. */
  40. enum PPEExceptions
  41. {
  42. NONE = -1,
  43. EXPOSURE = 50,
  44. DOF,
  45. EYEACCOM,
  46. NVLIGHTPARAMS,
  47. };
  48. //! PP operators, specify operation between subsequent layers
  49. enum PPOperators
  50. {
  51. LOWEST, //only lowest value gets used. Note - if first request, it is compared against default values!
  52. HIGHEST, //only highest value gets used. Note - if first request, it is compared against default values!
  53. ADD, //LINEAR addition
  54. ADD_RELATIVE, //LINEAR relative addition (relative to diff between current and max, where applicable. Otherwise used as absolute addition)
  55. SUBSTRACT, //LINEAR substraction
  56. SUBSTRACT_RELATIVE, //LINEAR relative substraction
  57. SUBSTRACT_REVERSE, //LINEAR sub. target from dst
  58. SUBSTRACT_REVERSE_RELATIVE, //LINEAR relative sub. target from dst
  59. MULTIPLICATIVE, //LINEAR multiplication
  60. SET, //sets the value, does not terminate possible further calculations
  61. OVERRIDE //does not interact; sets the value, and terminates possible further calculations. Use with care, preferred use is SET with higher priority command
  62. };
  63. class PPEConstants
  64. {
  65. static const int VAR_TYPE_BOOL = 1;
  66. static const int VAR_TYPE_INT = 2;
  67. static const int VAR_TYPE_FLOAT = 4;
  68. static const int VAR_TYPE_COLOR = 8;
  69. static const int VAR_TYPE_VECTOR = 16;
  70. static const int VAR_TYPE_BLENDABLE = VAR_TYPE_INT|VAR_TYPE_FLOAT|VAR_TYPE_COLOR;
  71. static const int VAR_TYPE_TEXTURE = 32;
  72. static const int VAR_TYPE_RESOURCE = 64;
  73. //static const int VALUE_MAX_COLOR = 255; //if only...
  74. static const int DEPENDENCY_ORDER_BASE = 0;
  75. static const int DEPENDENCY_ORDER_HIGHEST = 1; //!< number of potential recursive update cycles in case of parameter dependency
  76. }
  77. typedef Param2<string,bool> PPETemplateDefBool;
  78. typedef Param4<string,int,int,int> PPETemplateDefInt;
  79. typedef Param4<string,float,float,float> PPETemplateDefFloat; //name, default, min, max
  80. typedef Param5<string,float,float,float,float> PPETemplateDefColor; //name, defaults - floats. Min/Max is always the same, no need to define it here.
  81. //typedef Param4<string,vector,vector,vector> PPETemplateDefVector;
  82. typedef Param2<string,ref array<float>> PPETemplateDefVector; //needs to be compatible with every type of vector (vector2 to vector4), hence array<float>...
  83. typedef Param2<string,string> PPETemplateDefTexture; //Currently unused, setting these parameters during runtime can prove problematic
  84. typedef Param2<string,string> PPETemplateDefResource; //Currently unused, setting these parameters during runtime can prove problematic