Config.cpp 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117
  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.maxLightsPerCluster", 8);
  27. newOption("lf.maxSpritesPerFlare", 8);
  28. newOption("lf.maxFlares", 16);
  29. // Pps
  30. newOption("pps.bloom.enabled", true);
  31. newOption("pps.bloom.renderingQuality", 0.5);
  32. newOption("pps.bloom.blurringDist", 1.0);
  33. newOption("pps.bloom.samples", 5);
  34. newOption("pps.bloom.blurringIterationsCount", 1);
  35. newOption("pps.bloom.threshold", 1.0);
  36. newOption("pps.bloom.scale", 2.0);
  37. newOption("pps.ssao.enabled", true);
  38. newOption("pps.ssao.renderingQuality", 0.3);
  39. newOption("pps.ssao.blurringIterationsCount", 1);
  40. newOption("pps.sslr.enabled", true);
  41. newOption("pps.sslr.renderingQuality", 0.2);
  42. newOption("pps.sslr.blurringIterationsCount", 0);
  43. newOption("pps.bl.enabled", true);
  44. newOption("pps.bl.blurringIterationsCount", 1);
  45. newOption("pps.bl.sideBlurFactor", 1.0);
  46. newOption("pps.sslf.enabled", true);
  47. newOption("pps.enabled", true);
  48. newOption("pps.sharpen", true);
  49. newOption("pps.gammaCorrection", true);
  50. // Reflections
  51. newOption("ir.enabled", true);
  52. newOption("ir.rendererSize", 64);
  53. newOption("ir.cubemapTextureArraySize", 8);
  54. // Dbg
  55. newOption("dbg.enabled", false);
  56. // Globals
  57. newOption("width", 0);
  58. newOption("height", 0);
  59. newOption("renderingQuality", 1.0); // Applies only to MainRenderer
  60. newOption("lodDistance", 10.0); // Distance that used to calculate the LOD
  61. newOption("samples", 1);
  62. newOption("tessellation", true);
  63. newOption("sceneFrameAllocatorSize", 1024 * 1024);
  64. newOption("clusterSizeZ", 32);
  65. //
  66. // GR
  67. //
  68. newOption("gr.frameUniformsSize", 1024 * 1024 * 16);
  69. newOption("gr.frameStorageSize", 1024 * 1024 * 16);
  70. newOption("gr.frameVertexSize", 1024 * 1024 * 2);
  71. newOption("gr.frameTransferSize", 1024 * 1024 * 32);
  72. //
  73. // Resource
  74. //
  75. newOption("maxTextureSize", 1024 * 1024);
  76. newOption("textureAnisotropy", 8);
  77. newOption("dataPaths", ".");
  78. //
  79. // Window
  80. //
  81. newOption("glminor", 4);
  82. newOption("glmajor", 4);
  83. newOption("fullscreenDesktopResolution", false);
  84. newOption("debugContext",
  85. #if ANKI_DEBUG == 1
  86. true
  87. #else
  88. false
  89. #endif
  90. );
  91. }
  92. //==============================================================================
  93. Config::~Config()
  94. {}
  95. } // end namespace anki