Config.cpp 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899
  1. // Copyright (C) 2014, Panagiotis Christopoulos Charitos.
  2. // All rights reserved.
  3. // Code licensed under the BSD License.
  4. // http://www.anki3d.org/LICENSE
  5. #include "anki/core/Config.h"
  6. namespace anki {
  7. //==============================================================================
  8. Config::Config()
  9. {
  10. //
  11. // Renderer
  12. //
  13. // Ms
  14. newOption("ms.ez.enabled", false);
  15. newOption("ms.ez.maxObjectsToDraw", 10);
  16. // Is
  17. newOption("is.sm.enabled", true);
  18. newOption("is.sm.poissonEnabled", true);
  19. newOption("is.sm.bilinearEnabled", true);
  20. newOption("is.sm.resolution", 512);
  21. newOption("is.sm.maxLights", 4);
  22. newOption("is.groundLightEnabled", true);
  23. newOption("is.maxPointLights", 512 - 16);
  24. newOption("is.maxSpotLights", 8);
  25. newOption("is.maxSpotTexLights", 4);
  26. newOption("is.maxPointLightsPerTile", 48);
  27. newOption("is.maxSpotLightsPerTile", 4);
  28. newOption("is.maxSpotTexLightsPerTile", 4);
  29. // Pps
  30. newOption("pps.hdr.enabled", true);
  31. newOption("pps.hdr.renderingQuality", 0.5);
  32. newOption("pps.hdr.blurringDist", 1.0);
  33. newOption("pps.hdr.samples", 5);
  34. newOption("pps.hdr.blurringIterationsCount", 1);
  35. newOption("pps.hdr.exposure", 4.0);
  36. newOption("pps.ssao.enabled", true);
  37. newOption("pps.ssao.renderingQuality", 0.3);
  38. newOption("pps.ssao.blurringIterationsCount", 1);
  39. newOption("pps.sslr.enabled", true);
  40. newOption("pps.sslr.renderingQuality", 0.2);
  41. newOption("pps.sslr.blurringIterationsCount", 1);
  42. newOption("pps.bl.enabled", true);
  43. newOption("pps.bl.blurringIterationsCount", 1);
  44. newOption("pps.bl.sideBlurFactor", 1.0);
  45. newOption("pps.lf.enabled", true);
  46. newOption("pps.lf.maxFlaresPerLight", 8);
  47. newOption("pps.lf.maxLightsWithFlares", 4);
  48. newOption("pps.enabled", true);
  49. newOption("pps.sharpen", true);
  50. newOption("pps.gammaCorrection", true);
  51. // Dbg
  52. newOption("dbg.enabled", false);
  53. // Globals
  54. newOption("width", 0);
  55. newOption("height", 0);
  56. newOption("renderingQuality", 1.0); // Applies only to MainRenderer
  57. newOption("lodDistance", 10.0); // Distance that used to calculate the LOD
  58. newOption("samples", 1);
  59. newOption("tilesXCount", 16);
  60. newOption("tilesYCount", 16);
  61. newOption("tessellation", true);
  62. newOption("offscreen", false);
  63. //
  64. // Resource
  65. //
  66. newOption("maxTextureSize", 1024 * 1024);
  67. newOption("textureAnisotropy", 8);
  68. //
  69. // Window
  70. //
  71. newOption("glminor", 4);
  72. newOption("glmajor", 4);
  73. newOption("fullscreen", false);
  74. }
  75. //==============================================================================
  76. Config::~Config()
  77. {}
  78. } // end namespace anki