Config.cpp 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104
  1. // Copyright (C) 2009-2015, 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", 384);
  24. newOption("is.maxSpotLights", 16);
  25. newOption("is.maxSpotTexLights", 8);
  26. newOption("is.maxLightsPerTile", 16);
  27. // Pps
  28. newOption("pps.bloom.enabled", true);
  29. newOption("pps.bloom.renderingQuality", 0.5);
  30. newOption("pps.bloom.blurringDist", 1.0);
  31. newOption("pps.bloom.samples", 5);
  32. newOption("pps.bloom.blurringIterationsCount", 1);
  33. newOption("pps.bloom.threshold", 1.0);
  34. newOption("pps.bloom.scale", 2.0);
  35. newOption("pps.ssao.enabled", true);
  36. newOption("pps.ssao.renderingQuality", 0.3);
  37. newOption("pps.ssao.blurringIterationsCount", 1);
  38. newOption("pps.sslr.enabled", true);
  39. newOption("pps.sslr.renderingQuality", 0.2);
  40. newOption("pps.sslr.blurringIterationsCount", 1);
  41. newOption("pps.bl.enabled", true);
  42. newOption("pps.bl.blurringIterationsCount", 1);
  43. newOption("pps.bl.sideBlurFactor", 1.0);
  44. newOption("pps.lf.enabled", true);
  45. newOption("pps.lf.maxSpritesPerFlare", 8);
  46. newOption("pps.lf.maxFlares", 16);
  47. newOption("pps.enabled", true);
  48. newOption("pps.sharpen", true);
  49. newOption("pps.gammaCorrection", true);
  50. // Dbg
  51. newOption("dbg.enabled", false);
  52. // Globals
  53. newOption("width", 0);
  54. newOption("height", 0);
  55. newOption("renderingQuality", 1.0); // Applies only to MainRenderer
  56. newOption("lodDistance", 10.0); // Distance that used to calculate the LOD
  57. newOption("samples", 1);
  58. newOption("tessellation", true);
  59. newOption("sceneFrameAllocatorSize", 1024 * 1024);
  60. newOption("offscreen", false);
  61. //
  62. // Resource
  63. //
  64. newOption("maxTextureSize", 1024 * 1024);
  65. newOption("textureAnisotropy", 8);
  66. //
  67. // Window
  68. //
  69. newOption("glminor", 4);
  70. newOption("glmajor", 4);
  71. newOption("fullscreenDesktopResolution", false);
  72. newOption("debugContext",
  73. #if ANKI_DEBUG == 1
  74. true
  75. #else
  76. false
  77. #endif
  78. );
  79. }
  80. //==============================================================================
  81. Config::~Config()
  82. {}
  83. } // end namespace anki