BVB Source Codes

CRYENGINE Show cvars.cpp Source code

Return Download CRYENGINE: download cvars.cpp Source code - Download CRYENGINE Source code - Type:.cpp
  1. // Copyright 2001-2016 Crytek GmbH / Crytek Group. All rights reserved.
  2.  
  3. // -------------------------------------------------------------------------
  4. //  File name:   cvars.cpp
  5. //  Version:     v1.00
  6. //  Created:     28/5/2001 by Vladimir Kajalin
  7. //  Compilers:   Visual Studio.NET
  8. //  Description: console variables used in 3dengine
  9. // -------------------------------------------------------------------------
  10. //  History:
  11. //
  12. ////////////////////////////////////////////////////////////////////////////
  13.  
  14. #include "StdAfx.h"
  15.  
  16. #include "3dEngine.h"
  17. #include <CryRenderer/IRenderer.h>
  18. #include <Cry3DEngine/IStatObj.h>  // MAX_STATOBJ_LODS_NUM
  19. #include <Cry3DEngine/ITimeOfDay.h>
  20.  
  21. //////////////////////////////////////////////////////////////////////////
  22. void OnTimeOfDayVarChange(ICVar* pArgs)
  23. {
  24.         gEnv->p3DEngine->GetTimeOfDay()->SetTime(Cry3DEngineBase::GetCVars()->e_TimeOfDay);
  25. }
  26.  
  27. void OnTimeOfDaySpeedVarChange(ICVar* pArgs)
  28. {
  29.         ITimeOfDay::SAdvancedInfo advInfo;
  30.         gEnv->p3DEngine->GetTimeOfDay()->GetAdvancedInfo(advInfo);
  31.         advInfo.fAnimSpeed = Cry3DEngineBase::GetCVars()->e_TimeOfDaySpeed;
  32.         gEnv->p3DEngine->GetTimeOfDay()->SetAdvancedInfo(advInfo);
  33. }
  34.  
  35. void OnCGFStreamingChange(ICVar* pArgs)
  36. {
  37.         if (gEnv->IsEditor())
  38.         {
  39.                 Cry3DEngineBase::GetCVars()->e_StreamCgf = 0;
  40.         }
  41. }
  42.  
  43. void OnPerCharacterShadowsChange(ICVar* pArgs)
  44. {
  45.         Cry3DEngineBase::Get3DEngine()->ObjectsTreeMarkAsUncompiled(NULL);
  46. }
  47.  
  48. void OnGsmLodsNumChange(ICVar* pArgs)
  49. {
  50.         Cry3DEngineBase::GetRenderer()->UpdateCachedShadowsLodCount(pArgs->GetIVal());
  51. }
  52.  
  53. void OnDynamicDistanceShadowsVarChange(ICVar* pArgs)
  54. {
  55.         Cry3DEngineBase::Get3DEngine()->ObjectsTreeMarkAsUncompiled(NULL);
  56.         Cry3DEngineBase::Get3DEngine()->SetRecomputeCachedShadows(ShadowMapFrustum::ShadowCacheData::eFullUpdate);
  57. }
  58.  
  59. void OnVegetationVisibleChange(ICVar* pArgs)
  60. {
  61.         if (Cry3DEngineBase::Get3DEngine()->m_pObjectsTree.empty())
  62.         {
  63.                 return;
  64.         }
  65.  
  66.         COctreeNode* pObjectsTree = Cry3DEngineBase::Get3DEngine()->m_pObjectsTree[0];
  67.         if (pObjectsTree && !pObjectsTree->IsEmpty())
  68.         {
  69.                 if (pArgs->GetIVal() != 0)
  70.                 {
  71.                         pObjectsTree->PhysicalizeOfType(eRNListType_Vegetation, false);
  72.                 }
  73.                 else
  74.                 {
  75.                         pObjectsTree->DePhysicalizeOfType(eRNListType_Vegetation, false);
  76.                 }
  77.         }
  78. }
  79.  
  80. void CVars::Init()
  81. {
  82.         REGISTER_CVAR(e_PermanentRenderObjects, 1, VF_NULL, "Activates usage of permanent render objects\n2 = skip level objects where permanent render objects are used");
  83.  
  84.         DefineConstIntCVar(e_Fog, 1, VF_CHEAT | VF_CHEAT_ALWAYS_CHECK,
  85.                            "Activates global height/distance based fog");
  86.         DefineConstIntCVar(e_FogVolumes, 1, VF_CHEAT | VF_CHEAT_ALWAYS_CHECK,
  87.                            "Activates local height/distance based fog volumes");
  88.         REGISTER_CVAR(e_VolumetricFog, 0, VF_NULL,
  89.                       "Activates volumetric fog");
  90.         REGISTER_CVAR(e_Entities, 1, VF_CHEAT | VF_CHEAT_ALWAYS_CHECK,
  91.                       "Activates drawing of entities and brushes");
  92.         DefineConstIntCVar(e_SkyBox, 1, VF_CHEAT,
  93.                            "Activates drawing of skybox and moving cloud layers");
  94.         DefineConstIntCVar(e_WaterOcean, e_WaterOceanDefault, VF_CHEAT | VF_CHEAT_ALWAYS_CHECK,
  95.                            "Activates drawing of ocean. \n"
  96.                            "1: use usual rendering path\n"
  97.                            "2: use fast rendering path with merged fog");
  98.         DefineConstIntCVar(e_WaterOceanBottom, 1, VF_CHEAT,
  99.                            "Activates drawing bottom of ocean");
  100.  
  101.         REGISTER_CVAR(e_WaterOceanFFT, 0, VF_NULL,
  102.                       "Activates fft based ocean");
  103.  
  104.         DefineConstIntCVar(e_WaterRipplesDebug, 0, VF_CHEAT,
  105.                            "Draw water hits that affect water ripple simulation");
  106.  
  107.         DefineConstIntCVar(e_DebugDrawShowOnlyCompound, 0, VF_NULL,
  108.                            "e_DebugDraw shows only Compound (less efficient) static meshes");
  109.         DefineConstIntCVar(e_DebugDrawShowOnlyLod, -1, VF_NULL,
  110.                            "e_DebugDraw shows only objects showing lod X");
  111.  
  112.         DefineConstIntCVar(e_DebugDraw, 0, VF_CHEAT | VF_CHEAT_ALWAYS_CHECK,
  113.                            "Draw helpers with information for each object (same number negative hides the text)\n"
  114.                            " 1: Name of the used cgf, polycount, used LOD\n"
  115.                            " 2: Color coded polygon count\n"
  116.                            " 3: Show color coded LODs count, flashing color indicates no Lod\n"
  117.                            " 4: Display object texture memory usage\n"
  118.                            " 5: Display color coded number of render materials\n"
  119.                            " 6: Display ambient color\n"
  120.                            " 7: Display tri count, number of render materials, texture memory\n"
  121.                            " 8: Free slot\n"
  122.                            " 9: Free slot\n"
  123.                            "10: Render geometry with simple lines and triangles\n"
  124.                            "11: Free slot\n"
  125.                            "12: Free slot\n"
  126.                            "13: Display occlusion amount (used during AO computations). Warning: can take a long time to calculate, depending on level size! \n"
  127.                            "15: Display helpers\n"
  128.                            "16: Display debug gun\n"
  129.                            "17: Streaming info (buffer sizes)\n"
  130.                            "18: Free slot\n"
  131.                            "19: Physics proxy triangle count\n"
  132.                            "20: Display Character attachments texture memory usage\n"
  133.                            "21: Display animated object distance to camera\n"
  134.                            "22: Display object's current LOD vertex count\n"
  135.                            "23: Display shadow casters in red\n"
  136.                            "----------------debug draw list values. Any of them enable 2d on-screen listing type info debug. Specific values define the list sorting-----------\n"
  137.                            " 100: tri count\n"
  138.                            " 101: verts count\n"
  139.                            " 102: draw calls\n"
  140.                            " 103: texture memory\n"
  141.                            " 104: mesh memory");
  142.  
  143. #ifndef _RELEASE
  144.         DefineConstIntCVar(e_DebugDrawListSize, 24, VF_DEV_ONLY, "num objects in the list for e_DebugDraw list infodebug");
  145.         ICVar* e_DebugDrawListFilter = REGISTER_STRING_CB_DEV_ONLY("e_DebugDrawListFilter", "", VF_NULL,
  146.                                                                    "filter for e_DebugDraw list. Combine object type letters to create the filter\n"
  147.                                                                    "(example: e_DebugDrawListFilter BVC = shows Brushes+Vegetation+Characters). 'all' = no filter.\n"
  148.                                                                    " B: Brushes\n"
  149.                                                                    " V: Vegetation\n"
  150.                                                                    " C: Character\n"
  151.                                                                    " S: StatObj (non characters)\n", NULL);
  152.         DefineConstIntCVar(e_DebugDrawListBBoxIndex, 0, VF_DEV_ONLY,
  153.                            "enables BBOX drawing for the 'n' element of the DebugDrawList (starting by 1.   0 = no bbox drawing).");
  154.         REGISTER_COMMAND("e_DebugDrawListCMD", CDebugDrawListMgr::ConsoleCommand, VF_DEV_ONLY,
  155.                          "Issue commands to control e_DebugDraw list debuginfo behaviour\n"
  156.                          "'Freeze' (F) - stops refreshing stats\n"
  157.                          "'Continue' (C) - unfreezes\n"
  158.                          "'DumpLog' (D) - dumps the current on-screen info into the log");
  159. #endif
  160.  
  161. #if !defined(_RELEASE)
  162.         e_pStatObjRenderFilterStr = NULL;
  163.         REGISTER_CVAR2("e_StatObjRenderFilter", &e_pStatObjRenderFilterStr, "", VF_NULL, "Debug: Controls which cgfs are rendered, based on input string");
  164.         e_statObjRenderFilterMode = 0;
  165.         REGISTER_CVAR2("e_StatObjRenderFilterMode", &e_statObjRenderFilterMode, 0, VF_NULL, "Debug: Controls how e_StatObjRenderFilter is use. 0=disabled 1=include 2=exclude");
  166. #endif
  167.  
  168.         REGISTER_CVAR(e_TerrainDetailMaterials, 1, VF_CHEAT | VF_CHEAT_ALWAYS_CHECK,
  169.                       "Activates drawing of detail materials on terrain ground");
  170.         DefineConstIntCVar(e_TerrainDetailMaterialsDebug, 0, VF_CHEAT,
  171.                            "Shows number of materials in use per terrain sector");
  172.         DefineConstFloatCVar(e_TerrainDetailMaterialsViewDistZ, VF_NULL,
  173.                              "Max view distance of terrain Z materials");
  174.         DefineConstFloatCVar(e_TerrainDetailMaterialsViewDistXY, VF_NULL,
  175.                              "Max view distance of terrain XY materials");
  176.         DefineConstFloatCVar(e_SunAngleSnapSec, VF_NULL,
  177.                              "Sun dir snap control");
  178.         DefineConstFloatCVar(e_SunAngleSnapDot, VF_NULL,
  179.                              "Sun dir snap control");
  180.  
  181.         REGISTER_CVAR(e_Particles, 1, VF_CHEAT | VF_CHEAT_ALWAYS_CHECK,
  182.                       "Activates drawing of particles");
  183.         DefineConstIntCVar(e_ParticlesDebug, 0, VF_CHEAT | VF_BITFIELD,
  184.                            "Particle debug flags: <flags> to set, <flags>+ to add, <flags>- to remove"
  185.                            " 1 = show basic stats"
  186.                            " m = show memory usage"
  187.                            " r = show reiteration, rejection, and collision stats"
  188.                            " b = draw bounding boxes and labels, show bounding box stats"
  189.                            " x = show bounding box stats"
  190.                            " d = force dynamic bounds and update for all emitters"
  191.                            " c = disable clipping against water and vis area bounds"
  192.                            " z = freeze particle system");
  193.         REGISTER_CVAR(e_ParticlesThread, 1, VF_BITFIELD,
  194.                       "Enable particle threading");
  195.         REGISTER_CVAR(e_ParticlesObjectCollisions, 2, VF_NULL,
  196.                       "Enable particle/object collisions for SimpleCollision:\n"
  197.                       "  1 = against static objects only, 2 = dynamic also");
  198.         REGISTER_CVAR(e_ParticlesMinPhysicsDynamicBounds, 2, VF_NULL,
  199.                       "Min particle PhysicsType to force dynamic bounds computation:\n"
  200.                       "  0 = never force, 1 = SimpleCollision, 2 = SimplePhysics, 3 = RigidBody");
  201.         REGISTER_CVAR(e_ParticlesSortQuality, 1, VF_NULL,
  202.                       "Minimum sort quality for new particle insertion:\n"
  203.                       "  0 = basic, 1 = better, 2 = best");
  204.         REGISTER_CVAR(e_ParticlesPreload, 0, VF_NULL,
  205.                       "Enable preloading of all particle effects at the beginning");
  206.         REGISTER_CVAR(e_ParticlesAllowRuntimeLoad, 1, VF_NULL,
  207.                       "Allow loading of dynamic particle effects at runtime");
  208.         REGISTER_CVAR(e_ParticlesConvertPfx1, 0, VF_NULL,
  209.                       "Convert pfx1 to pfx2 when loaded");
  210.         DefineConstIntCVar(e_ParticlesSerializeNamedFields, 1, VF_NULL,
  211.                            "Save effects libraries with named fields for future compatibility (compatible with versions >= 24)");
  212.         REGISTER_CVAR(e_ParticlesLod, 1, VF_NULL,
  213.                       "Multiplier to particle count");
  214.         REGISTER_CVAR(e_ParticlesMinDrawAlpha, 0.004f, VF_NULL,
  215.                       "Alpha cutoff for rendering particles");
  216.         REGISTER_CVAR(e_ParticlesMinDrawPixels, 0.5, VF_NULL,
  217.                       "Pixel size min per particle -- fade out earlier");
  218.         REGISTER_CVAR(e_ParticlesMaxDrawScreen, 2, VF_NULL,
  219.                       "Screen size max per particle -- fade out earlier");
  220.         REGISTER_CVAR(e_ParticlesMaxScreenFill, 64, VF_NULL,
  221.                       "Screen size max of total particles to draw");
  222.         DefineConstIntCVar(e_ParticlesCullAgainstViewFrustum, 1, VF_CHEAT,
  223.                            "Cull Particles against the view-frustum");
  224.         DefineConstIntCVar(e_ParticlesCullAgainstOcclusionBuffer, 1, VF_CHEAT,
  225.                            "Cull Particles against the Occlusion Buffer");
  226.  
  227.         DefineConstIntCVar(e_ParticlesDumpMemoryAfterMapLoad, 0, VF_NULL,
  228.                            "Set to 1 to dump particle memory informations after map load");
  229.  
  230.         REGISTER_CVAR(e_ParticlesVertexPoolSize, 256, VF_NULL,
  231.                       "Memory Size of Vertex Pool between Particle and Render Thread");
  232.  
  233.         REGISTER_CVAR(e_ParticlesIndexPoolSize, 16, VF_NULL,
  234.                       "Memory Size of Index Pool between Particle and Render Thread");
  235.  
  236.         REGISTER_CVAR(e_ParticlesProfile, 0, VF_NULL,
  237.                   "PFx1 only:\n"
  238.                       "1 - always show statistics about particle pools usage\n"
  239.                       "2 - disable the warning message when running out of pool memory");
  240.         REGISTER_CVAR(e_ParticlesProfiler, 0, VF_BITFIELD,
  241.                           "Wavicle only:\n"
  242.                   "1 - Display profiler on screen\n"
  243.                           "f - Output statistics to a csv file");
  244.         e_ParticlesProfilerOutputFolder = REGISTER_STRING("e_ParticlesProfilerOutputFolder", "%USER%/ParticlesProfiler/", VF_NULL,
  245.                 "Folder to output particle profiler");
  246.         e_ParticlesProfilerOutputName = REGISTER_STRING("e_ParticlesProfilerOutputName", "frame", VF_NULL,
  247.                 "Name of the particle statistics file name");
  248.         REGISTER_CVAR(e_ParticlesProfilerCountBudget, 80000, VF_NULL,
  249.                 "Particle counts budget to be shown during profiling");
  250.         REGISTER_CVAR(e_ParticlesProfilerTimingBudget, 10000, VF_NULL,
  251.                 "Particle processing time budget (in nanoseconds) to be shown during profiling");
  252.  
  253.         DefineConstFloatCVar(e_ParticlesLightMinRadiusThreshold, VF_NULL,
  254.                              "Threshold for minimum particle light radius");
  255.  
  256.         DefineConstFloatCVar(e_ParticlesLightMinColorThreshold, VF_NULL,
  257.                              "Threshold for minumum particle light color");
  258.  
  259.         REGISTER_CVAR(e_ParticlesForceSeed, 0, VF_NULL,
  260.                 "0 - every emitter is random unless a seed is specified\n"
  261.                 "n - uses this value as seed for all emitters without specified seed");
  262.  
  263.         DefineConstIntCVar(e_Roads, 1, VF_CHEAT | VF_CHEAT_ALWAYS_CHECK,
  264.                            "Activates drawing of road objects");
  265.  
  266.         REGISTER_CVAR(e_Decals, 1, VF_NULL | VF_CHEAT_ALWAYS_CHECK,
  267.                       "Activates drawing of decals (game decals and hand-placed)");
  268.         REGISTER_CVAR(e_DecalsForceDeferred, 0, VF_NULL,
  269.                       "1 - force to convert all decals to use deferred ones");
  270.         REGISTER_CVAR(e_DecalsDeferredStatic, 1, VF_NULL,
  271.                       "1 - switch all non-planar decals placed by level designer to deferred");
  272.         REGISTER_CVAR(e_DecalsDeferredDynamic, 1, VF_NULL,
  273.                       "1 - make all game play decals deferred, 2 - make all game play decals non deferred");
  274.         DefineConstFloatCVar(e_DecalsDeferredDynamicMinSize, VF_CHEAT,
  275.                              "Convert only dynamic decals bigger than X into deferred");
  276.         DefineConstFloatCVar(e_DecalsDeferredDynamicDepthScale, VF_CHEAT,
  277.                              "Scale decal projection depth");
  278.         DefineConstFloatCVar(e_DecalsPlacementTestAreaSize, VF_CHEAT,
  279.                              "Avoid spawning decals on the corners or edges of entity geometry");
  280.         DefineConstFloatCVar(e_DecalsPlacementTestMinDepth, VF_CHEAT,
  281.                              "Avoid spawning decals on the corners or edges of entity geometry");
  282.         REGISTER_CVAR(e_DecalsMaxTrisInObject, 8000, VF_NULL,
  283.                       "Do not create decals on objects having more than X triangles");
  284.         REGISTER_CVAR(e_DecalsAllowGameDecals, 1, VF_NULL,
  285.                       "Allows creation of decals by game (like weapon bullets marks)");
  286.         DefineConstIntCVar(e_DecalsHitCache, 1, VF_CHEAT,
  287.                            "Use smart hit caching for bullet hits (may cause no decals in some cases)");
  288.         DefineConstIntCVar(e_DecalsMerge, 0, VF_NULL,
  289.                            "Combine pieces of decals into one render call");
  290.         DefineConstIntCVar(e_DecalsPreCreate, 1, VF_NULL,
  291.                            "Pre-create decals at load time");
  292.         DefineConstIntCVar(e_DecalsScissor, 1, VF_NULL,
  293.                            "Enable decal rendering optimization by using scissor");
  294.         DefineConstIntCVar(e_DecalsClip, 1, VF_NULL,
  295.                            "Clip decal geometry by decal bbox");
  296.         DefineConstFloatCVar(e_DecalsRange, VF_NULL,
  297.                              "Less precision for decals outside this range");
  298.         REGISTER_CVAR(e_DecalsLifeTimeScale, 1.f, VF_NULL,
  299.                       "Allows to increase or reduce decals life time for different specs");
  300.         REGISTER_CVAR(e_DecalsNeighborMaxLifeTime, 4.f, VF_NULL,
  301.                       "If not zero - new decals will force old decals to fade in X seconds");
  302.         REGISTER_CVAR(e_DecalsOverlapping, 0, VF_NULL,
  303.                       "If zero - new decals will not be spawned if the distance to nearest decals less than X");
  304.         DefineConstIntCVar(e_DecalsMaxValidFrames, 600, VF_NULL,
  305.                            "Number of frames after which not visible static decals are removed");
  306.         REGISTER_CVAR(e_DecalsMaxUpdatesPerFrame, 4, VF_NULL,
  307.                       "Maximum number of static decal render mesh updates per frame");
  308.         DefineConstIntCVar(e_VegetationBending, 2, VF_NULL,
  309.                            "Enable vegetation bending (does not affect merged grass)");
  310.         REGISTER_CVAR(e_VegetationUseTerrainColor, 1, VF_NULL,
  311.                       "Allow blend with terrain color for vegetations");
  312.         REGISTER_CVAR(e_VegetationUseTerrainColorDistance, 0, VF_NULL,
  313.                       "Controls distance of fading into terrain color\n"
  314.                       " 0 = Use 30% of maximum view distance of each vegetation instance (old default way)\n"
  315.                       "<0 = Maximum view distance value is calculated using vegetation mesh size (non scaled CGF size) and then multiplied by this cvar\n"
  316.                       ">0 = This value used directly as fading distance for all vegetations");
  317.         REGISTER_CVAR(e_BrushUseTerrainColor, 0, VF_NULL,
  318.                       "Allow blend with terrain color for brushes");
  319.         REGISTER_CVAR_CB(e_Vegetation, 1, VF_CHEAT | VF_CHEAT_ALWAYS_CHECK,
  320.                          "Activates drawing of distributed objects like trees", OnVegetationVisibleChange); // it run Physicalize or UnPhysicalize, So when use this value on Game, you should check the Performance.
  321.         REGISTER_CVAR(e_VegetationSprites, 0, VF_DEPRECATED,
  322.                       "[DEPRECATED] Activates drawing of sprites instead of distributed objects at far distance");
  323.         REGISTER_CVAR(e_LodTransitionSpriteMinDist, 4.f, VF_DEPRECATED,
  324.                       "[DEPRECATED] The min dist over which vegetation sprites dissolve");
  325.         REGISTER_CVAR(e_LodTransitionSpriteDistRatio, 0.1f, VF_DEPRECATED,
  326.                       "[DEPRECATED] The fraction of vegetation sprite draw distance over which to dissolve");
  327.         DefineConstIntCVar(e_VegetationSpritesBatching, 1, VF_DEPRECATED,
  328.                            "[DEPRECATED] Activates batch processing for sprites, optimizes CPU usage in case of dense vegetation");
  329.         DefineConstIntCVar(e_VegetationBoneInfo, 0, VF_CHEAT,
  330.                            "Logs information about number of bones in each vegetation object loaded");
  331.         REGISTER_CVAR(e_VegetationSpritesMinDistance, 8.0f, VF_DEPRECATED,
  332.                       "[DEPRECATED] Sets minimal distance when distributed object can be replaced with sprite");
  333.  
  334.         REGISTER_CVAR(e_VegetationSpritesDistanceRatio, 1.0f, VF_DEPRECATED,
  335.                       "[DEPRECATED] Allows changing distance on what vegetation switch into sprite");
  336.         REGISTER_CVAR(e_VegetationSpritesDistanceCustomRatioMin, 1.0f, VF_DEPRECATED,
  337.                       "[DEPRECATED] Clamps SpriteDistRatio setting in vegetation properties");
  338.         DefineConstIntCVar(e_ForceDetailLevelForScreenRes, 0, VF_DEPRECATED,
  339.                            "[DEPRECATED] Force sprite distance and other values used for some specific screen resolution, 0 means current");
  340.         REGISTER_CVAR(e_VegetationMinSize, 0.f, VF_REQUIRE_LEVEL_RELOAD | VF_CVARGRP_IGNOREINREALVAL,
  341.                       "Minimal size of static object, smaller objects will be not rendered");
  342.         REGISTER_CVAR(e_WindBendingStrength, 1.f, VF_CVARGRP_IGNOREINREALVAL,
  343.                       "Minimal size of static object, smaller objects will be not rendered");
  344.         REGISTER_CVAR(e_WindBendingAreaStrength, 1.f, VF_CVARGRP_IGNOREINREALVAL,
  345.                       "Minimal size of static object, smaller objects will be not rendered");
  346.  
  347.         DefineConstFloatCVar(e_VegetationSpritesScaleFactor, VF_DEPRECATED,
  348.                              "[DEPRECATED] [0-1] amount to factor in scale of sprites in sprite switch distance.");
  349.  
  350.         DefineConstIntCVar(e_Wind, 1, VF_CHEAT,
  351.                            "Enable global wind calculations, affects vegetations bending animations");
  352.         DefineConstIntCVar(e_WindAreas, 1, VF_CHEAT,
  353.                            "Debug");
  354.         DefineConstFloatCVar(e_WindBendingDistRatio, VF_CHEAT,
  355.                              "Wind cutoff distance for bending (linearly attentuated to that distance)");
  356.         REGISTER_CVAR(e_Shadows, 1, VF_NULL,
  357.                       "Activates drawing of shadows");
  358.         REGISTER_CVAR(e_ShadowsBlendCascades, 1, VF_NULL,
  359.                       "Blend between shadow cascades: 0=off, 1=on");
  360.         REGISTER_CVAR(e_ShadowsBlendCascadesVal, 0.75f, VF_NULL,
  361.                       "Size of cascade blend region");
  362. #if CRY_PLATFORM_WINDOWS
  363.         REGISTER_CVAR(e_ShadowsLodBiasFixed, 1, VF_NULL,
  364.                       "Simplifies mesh for shadow map generation by X LOD levels");
  365. #else
  366.         DefineConstIntCVar(e_ShadowsLodBiasFixed, 0, VF_NULL,
  367.                            "Simplifies mesh for shadow map generation by X LOD levels");
  368. #endif
  369.         DefineConstIntCVar(e_ShadowsLodBiasInvis, 0, VF_NULL,
  370.                            "Simplifies mesh for shadow map generation by X LOD levels, if object is not visible in main frame");
  371.  
  372.         DefineConstIntCVar(e_Tessellation, 1, VF_NULL,
  373.                            "HW geometry tessellation  0 = not allowed, 1 = allowed");
  374.         REGISTER_CVAR(e_TessellationMaxDistance, 30.f, VF_NULL,
  375.                       "Maximum distance from camera in meters to allow tessellation, also affects distance-based displacement fadeout");
  376.         DefineConstIntCVar(e_ShadowsTessellateCascades, 1, VF_NULL,
  377.                            "Maximum cascade number to render tessellated shadows (0 = no tessellation for sun shadows)");
  378.         DefineConstIntCVar(e_ShadowsTessellateDLights, 0, VF_NULL,
  379.                            "Disable/enable tessellation for local lights shadows");
  380.         REGISTER_CVAR(e_GsmCastFromTerrain, 1, VF_NULL,
  381.                       "Allows sun shadows from terrain to be activated in editor level settings");
  382.         DefineConstIntCVar(e_ShadowsFrustums, 0, VF_CHEAT,
  383.                            "Debug");
  384.         DefineConstIntCVar(e_ShadowsDebug, 0, VF_CHEAT,
  385.                            "0=off, 2=visualize shadow maps on the screen");
  386.         REGISTER_CVAR(e_ShadowsCacheUpdate, 0, VF_NULL,
  387.                       "Trigger updates of the shadow cache: 0=no update, 1=one update, 2=continuous updates");
  388.         REGISTER_CVAR(e_ShadowsCacheObjectLod, 0, VF_NULL,
  389.                       "The lod used for rendering objects into the shadow cache. Set to -1 to disable");
  390.         REGISTER_CVAR_CB(e_ShadowsCacheRenderCharacters, 0, VF_NULL,
  391.                          "Render characters into the shadow cache. 0=disabled, 1=enabled", OnDynamicDistanceShadowsVarChange);
  392.         REGISTER_CVAR_CB(e_DynamicDistanceShadows, 1, VF_NULL,
  393.                          "Enable dynamic distance shadows, 0=disable, 1=enable, -1=don't render dynamic distance shadows", OnDynamicDistanceShadowsVarChange);
  394.         DefineConstIntCVar(e_ShadowsCascadesCentered, 0, VF_NULL,
  395.                                "Force shadow cascades to be centered 0=disable 1=enable ");
  396.         DefineConstIntCVar(e_ShadowsCascadesDebug, 0, VF_CHEAT,
  397.                            "0=off, 1=visualize sun shadow cascades on screen");
  398.         REGISTER_CVAR_CB(e_ShadowsPerObject, 1, VF_NULL,
  399.                          "Per object shadow maps 0=off, 1=on, -1=don't draw object shadows", OnPerCharacterShadowsChange);
  400.         REGISTER_CVAR(e_ShadowsPerObjectResolutionScale, 1, VF_NULL,
  401.                       "Global scale for per object shadow texture resolution\n"
  402.                       "NOTE: individual texture resolution is rounded to next power of two ");
  403.         REGISTER_CVAR(e_ShadowsClouds, 1, VF_NULL,
  404.                       "Cloud shadows"); // no cheat var because this feature shouldn't be strong enough to affect gameplay a lot
  405.         REGISTER_CVAR(e_ShadowsPoolSize, 2048, VF_NULL,
  406.                       "Set size of shadow pool (e_ShadowsPoolSize*e_ShadowsPoolSize)");
  407.         REGISTER_CVAR(e_ShadowsMaxTexRes, 1024, VF_NULL,
  408.                       "Set maximum resolution of shadow map\n256(faster), 512(medium), 1024(better quality)");
  409.         REGISTER_CVAR(e_ShadowsResScale, 2.8f, VF_NULL,
  410.                       "Shadows slope bias for shadowgen");
  411.         REGISTER_CVAR(e_ShadowsAdaptScale, 2.72f, VF_NULL,
  412.                       "Shadows slope bias for shadowgen");
  413.         REGISTER_CVAR(e_ShadowsSlopeBias, 1.0f, VF_NULL,
  414.                       "Shadows slope bias for shadowgen");
  415.         REGISTER_CVAR(e_ShadowsSlopeBiasHQ, 0.25f, VF_NULL,
  416.                       "Shadows slope bias for shadowgen (for high quality mode)");
  417.         REGISTER_CVAR(e_ShadowsConstBias, 1.0f, VF_NULL,
  418.                       "Shadows slope bias for shadowgen");
  419.         REGISTER_CVAR(e_ShadowsConstBiasHQ, 0.05f, VF_NULL,
  420.                       "Shadows slope bias for shadowgen (high quality mode)");
  421.  
  422.         DefineConstIntCVar(e_ShadowsMasksLimit, 0, VF_NULL,
  423.                            "Maximum amount of allocated shadow mask textures\n"
  424.                            "This limits the number of shadow casting lights overlapping\n"
  425.                            "0=disable limit(unpredictable memory requirements)\n"
  426.                            "1=one texture (4 channels for 4 lights)\n"
  427.                            "2=two textures (8 channels for 8 lights), ...");
  428.  
  429.         REGISTER_CVAR(e_ShadowsUpdateViewDistRatio, 128, VF_NULL,
  430.                       "View dist ratio for shadow maps updating for shadowpool");
  431.         DefineConstFloatCVar(e_ShadowsCastViewDistRatioLights, VF_NULL,
  432.                              "View dist ratio for shadow maps casting for light sources");
  433.         REGISTER_CVAR(e_ShadowsCastViewDistRatio, 0.8f, VF_NULL,
  434.                       "View dist ratio for shadow maps casting from objects");
  435.         REGISTER_CVAR(e_GsmRange, 3.0f, VF_NULL,
  436.                       "Size of LOD 0 GSM area (in meters)");
  437.         REGISTER_CVAR(e_GsmRangeStep, 3.0f, VF_NULL,
  438.                       "Range of next GSM lod is previous range multiplied by step");
  439.         REGISTER_CVAR_CB(e_GsmLodsNum, 5, VF_NULL,
  440.                          "Number of GSM lods (0..5)", OnGsmLodsNumChange);
  441.         DefineConstIntCVar(e_GsmDepthBoundsDebug, 0, VF_NULL,
  442.                            "Debug GSM bounds regions calculation");
  443.         DefineConstIntCVar(e_GsmStats, 0, VF_CHEAT,
  444.                            "Show GSM statistics 0=off, 1=enable debug to the screens");
  445.         REGISTER_CVAR(e_RNTmpDataPoolMaxFrames, 300, VF_CHEAT,
  446.                       "Cache RNTmpData at least for X framres");
  447.  
  448.         REGISTER_CVAR(e_Terrain, 1, VF_CHEAT | VF_CHEAT_ALWAYS_CHECK,
  449.                       "Activates drawing of terrain ground");
  450.         DefineConstIntCVar(e_TerrainDeformations, 0, VF_CHEAT,
  451.                            "Allows in-game terrain surface deformations");
  452.         DefineConstIntCVar(e_AutoPrecacheCameraJumpDist, 16, VF_CHEAT,
  453.                            "When not 0 - Force full pre-cache of textures, procedural vegetation and shaders\n"
  454.                            "if camera moved for more than X meters in one frame or on new cut scene start");
  455.         REGISTER_CVAR(e_AutoPrecacheTerrainAndProcVeget, 0, VF_CHEAT,
  456.                       "Force auto pre-cache of terrain textures and procedural vegetation");
  457.         DefineConstIntCVar(e_AutoPrecacheTexturesAndShaders, 0, VF_CHEAT,
  458.                            "Force auto pre-cache of general textures and shaders");
  459.         DefineConstIntCVar(e_AutoPrecacheCgf, 1, VF_CHEAT,
  460.                            "Force auto pre-cache of CGF render meshes. 1=pre-cache all mehes around camera. 2=pre-cache only important ones (twice faster)");
  461.         DefineConstIntCVar(e_TerrainBBoxes, 0, VF_CHEAT,
  462.                            "Show terrain nodes bboxes");
  463.         DefineConstIntCVar(e_TerrainOcclusionCulling, 1, VF_CHEAT,
  464.                            "heightmap occlusion culling with time coherency 0=off, 1=on");
  465.         DefineConstFloatCVar(e_TerrainOcclusionCullingStepSizeDelta, VF_CHEAT,
  466.                              "Step size scale on every next step (for version 1)");
  467.         REGISTER_CVAR(e_TerrainOcclusionCullingMaxDist, 200.f, VF_NULL,
  468.                 "Max length of ray (for version 1)");
  469.         REGISTER_CVAR(e_TerrainMeshInstancingMinLod, 3, VF_NULL,
  470.                 "Mesh instancing is used for distant terrain sectors and for shadow map generation");
  471.         REGISTER_CVAR(e_TerrainMeshInstancingShadowLodRatio, 0.3f, VF_NULL,
  472.                 "Smaller values produce less draw calls and less polygons for terrain shadow map generation");
  473.         REGISTER_CVAR(e_TerrainMeshInstancingShadowBias, 0.5f, VF_NULL,
  474.                 "During shadow map generation render distant terrain sectors little lower for less problems with terrain self-shadowing");
  475.         REGISTER_CVAR(e_StreamPredictionUpdateTimeSlice, 0.4f, VF_NULL,
  476.                       "Maximum amount of time to spend for scene streaming priority update in milliseconds");
  477.         REGISTER_CVAR(e_StreamAutoMipFactorSpeedThreshold, 0.f, VF_NULL,
  478.                       "Debug");
  479.         REGISTER_CVAR(e_StreamAutoMipFactorMin, 0.5f, VF_NULL,
  480.                       "Debug");
  481.         REGISTER_CVAR(e_StreamAutoMipFactorMax, 1.0f, VF_NULL,
  482.                       "Debug");
  483.         REGISTER_CVAR(e_StreamAutoMipFactorMaxDVD, 0.5f, VF_NULL,
  484.                       "Debug");
  485.         DefineConstIntCVar(e_TerrainOcclusionCullingDebug, 0, VF_CHEAT,
  486.                            "Draw sphere on every terrain height sample");
  487.         DefineConstIntCVar(e_TerrainOcclusionCullingMaxSteps, 50, VF_CHEAT,
  488.                            "Max number of tests per ray (for version 0)");
  489.         DefineConstIntCVar(e_TerrainOcclusionCullingStepSize, 4, VF_CHEAT,
  490.                            "Initial size of single step (in heightmap units)");
  491.         DefineConstIntCVar(e_TerrainTextureStreamingDebug, 0, VF_CHEAT,
  492.                            "Debug");
  493.         REGISTER_CVAR(e_TerrainTextureStreamingPoolItemsNum, 256, VF_REQUIRE_LEVEL_RELOAD,
  494.                       "Specifies number of textures in terrain base texture streaming pool");
  495.         DefineConstIntCVar(e_TerrainDrawThisSectorOnly, 0, VF_CHEAT,
  496.                            "1 - render only sector where camera is and objects registered in sector 00\n"
  497.                            "2 - render only sector where camera is");
  498.         DefineConstFloatCVar(e_TerrainOcclusionCullingPrecision, VF_CHEAT,
  499.                              "Density of rays");
  500.         DefineConstFloatCVar(e_TerrainOcclusionCullingPrecisionDistRatio, VF_CHEAT,
  501.                              "Controls density of rays depending on distance to the object");
  502.         REGISTER_CVAR(e_TerrainLodRatio, 1.f, VF_NULL,
  503.                       "Set heightmap LOD, this value is combined with sector error metrics and distance to camera");
  504.         REGISTER_CVAR(e_TerrainLodDistRatio, 1.f, VF_NULL,
  505.                       "Set heightmap LOD, this value is combined only with sector distance to camera and ignores sector error metrics");
  506.         DefineConstFloatCVar(e_TerrainLodRatioHolesMin, VF_NULL,
  507.                              "Rises LOD for distant terrain sectors with holes, prevents too strong distortions of holes on distance ");
  508.  
  509.         REGISTER_CVAR(e_OcclusionCullingViewDistRatio, 0.5f, VF_NULL,
  510.                       "Skip per object occlusion test for very far objects - culling on tree level will handle it");
  511.  
  512.         DefineConstFloatCVar(e_TerrainTextureLodRatio, VF_NULL,
  513.                              "Adjust terrain base texture resolution on distance");
  514.  
  515.         REGISTER_CVAR(e_Sun, 1, VF_CHEAT,
  516.                       "Activates sun light source");
  517.         REGISTER_CVAR(e_CoverageBuffer, 1, VF_NULL,
  518.                       "Activates usage of software coverage buffer.\n"
  519.                       "1 - camera culling only\n"
  520.                       "2 - camera culling and light-to-object check");
  521.         REGISTER_CVAR(e_CoverageBufferCullIndividualBrushesMaxNodeSize, 16, VF_CHEAT,
  522.                            "128 - cull only nodes of scene tree and very big brushes\n"
  523.                            "0 - cull all brushes individually");
  524.         DefineConstIntCVar(e_CoverageBufferTerrain, 0, VF_NULL,
  525.                            "Activates usage of coverage buffer for terrain");
  526.         DefineConstIntCVar(e_CoverageBufferDebug, 0, VF_CHEAT,
  527.                            "Display content of main camera coverage buffer");
  528.         DefineConstIntCVar(e_CoverageBufferDebugFreeze, 0, VF_CHEAT,
  529.                            "Freezes view matrix/-frustum ");
  530.         DefineConstIntCVar(e_CoverageBufferDrawOccluders, 0, VF_CHEAT,
  531.                            "Debug draw of occluders for coverage buffer");
  532.         REGISTER_CVAR(e_CoverageBufferBias, 0.05f, VF_NULL,
  533.                       "Coverage buffer z-biasing");
  534.         REGISTER_CVAR(e_CoverageBufferAABBExpand, 0.020f, VF_NULL,
  535.                       "expanding the AABB's of the objects to test to avoid z-fighting issues in the Coverage buffer");
  536.         REGISTER_CVAR(e_CoverageBufferEarlyOut, 1, VF_NULL,
  537.                       "preempting occluder rasterization to avoid stalling in the main thread if rendering is faster");
  538.         REGISTER_CVAR(e_CoverageBufferEarlyOutDelay, 3.0f, VF_NULL,
  539.                       "Time in ms that rasterizer is allowed to continue working after early out request");
  540.         REGISTER_CVAR(e_CoverageBufferTerrainExpand, 0.025f, VF_NULL,
  541.                       "expanding the AABB Z axis of terrain to avoid flat terrain flickering");
  542.  
  543.         REGISTER_CVAR(e_CoverageBufferReproj, 6, VF_NULL,
  544.                       "Selects occlusion culling mode\n"
  545.                       "  1 - Simple reprojection\n"
  546.                       "  2 - Reprojection with hole filling\n"
  547.                       "  4 - Rasterized occlusion meshes\n"
  548.                       "  6 - Reprojection and occlusion meshes");
  549.         REGISTER_CVAR(e_CoverageBufferRastPolyLimit, 60000, VF_NULL,
  550.                       "maximum amount of polys to rasterize cap, 0 means no limit\ndefault is 500000");
  551.         REGISTER_CVAR(e_CoverageBufferShowOccluder, 0, VF_NULL,
  552.                       "1 show only meshes used as occluder, 2 show only meshes not used as occluder");
  553.         REGISTER_CVAR(e_CoverageBufferOccludersViewDistRatio, 1.0f, VF_CHEAT,
  554.                       "Debug");
  555.  
  556.         DefineConstIntCVar(e_DynamicLightsMaxCount, 512, VF_CHEAT,
  557.                            "Sets maximum amount of dynamic light sources");
  558.  
  559.         DefineConstIntCVar(e_DynamicLights, 1, VF_CHEAT,
  560.                            "Activates dynamic light sources");
  561.         DefineConstIntCVar(e_DynamicLightsForceDeferred, 1, VF_CHEAT,
  562.                            "Convert all lights to deferred (except sun)");
  563.         REGISTER_CVAR(e_DynamicLightsFrameIdVisTest, 1, VF_NULL,
  564.                       "Use based on last draw frame visibility test");
  565.         DefineConstIntCVar(e_DynamicLightsConsistentSortOrder, 1, VF_NULL,
  566.                            "Debug");
  567.  
  568.         DefineConstIntCVar(e_HwOcclusionCullingWater, 1, VF_NULL,
  569.                            "Activates usage of HW occlusion test for ocean");
  570.  
  571.         DefineConstIntCVar(e_Portals, 1, VF_CHEAT,
  572.                            "Activates drawing of visareas content (indoors), values 2,3,4 used for debugging");
  573.         DefineConstIntCVar(e_PortalsBigEntitiesFix, 1, VF_CHEAT,
  574.                            "Enables special processing of big entities like vehicles intersecting portals");
  575.         DefineConstIntCVar(e_PortalsBlend, 1, VF_CHEAT,
  576.                            "Blend lights and cubemaps of vis areas connected to portals 0=off, 1=on");
  577.         REGISTER_CVAR(e_PortalsMaxRecursion, 8, VF_NULL,
  578.                       "Maximum number of visareas and portals to traverse for indoor rendering");
  579.         REGISTER_CVAR(e_DynamicLightsMaxEntityLights, 16, VF_NULL,
  580.                       "Set maximum number of lights affecting object");
  581.         DefineConstFloatCVar(e_MaxViewDistance, VF_CHEAT,
  582.                              "Far clipping plane distance");
  583.         REGISTER_CVAR(e_MaxViewDistSpecLerp, 1, VF_NULL,
  584.                       "1 - use max view distance set by designer for very high spec\n0 - for very low spec\nValues between 0 and 1 - will lerp between high and low spec max view distances");
  585.         DefineConstFloatCVar(e_MaxViewDistFullDistCamHeight, VF_CHEAT,
  586.                              "Debug");
  587.         DefineConstIntCVar(e_WaterVolumes, e_WaterVolumesDefault, VF_CHEAT,
  588.                            "Activates drawing of water volumes\n"
  589.                            "1: use usual rendering path\n"
  590.                            "2: use fast rendering path with merged fog");
  591.         DefineConstIntCVar(e_WaterWaves, 0, VF_CHEAT,
  592.                            "Activates drawing of water waves");
  593.         DefineConstIntCVar(e_WaterWavesTessellationAmount, 5, VF_NULL,
  594.                            "Sets water waves tessellation amount");
  595.         REGISTER_CVAR(e_WaterTessellationAmount, 10, VF_NULL,
  596.                       "Set tessellation amount");
  597.         REGISTER_CVAR(e_WaterTessellationAmountX, 10, VF_NULL,
  598.                       "Set tessellation on x axis - 0 means not used");
  599.         REGISTER_CVAR(e_WaterTessellationAmountY, 10, VF_NULL,
  600.                       "Set tessellation on y axis - 0 means not used");
  601.         REGISTER_CVAR(e_WaterTessellationSwathWidth, 12, VF_NULL,
  602.                       "Set the swath width for the boustrophedonic mesh stripping");
  603.         DefineConstIntCVar(e_BBoxes, 0, VF_CHEAT,
  604.                            "Activates drawing of bounding boxes");
  605.  
  606.         DefineConstIntCVar(e_StreamSaveStartupResultsIntoXML, 0, VF_NULL,
  607.                            "Save basic information about streaming performance on level start into XML");
  608.         REGISTER_CVAR(e_StreamCgfPoolSize, 128, VF_NULL,
  609.                       "Render mesh cache size in MB");
  610.         REGISTER_CVAR(e_SQTestBegin, 0, VF_NULL,
  611.                       "If not zero - start streaming latency unit test");
  612.         REGISTER_CVAR(e_SQTestCount, 0, VF_NULL,
  613.                       "If not zero - restart test X times");
  614.         REGISTER_CVAR(e_SQTestExitOnFinish, 0, VF_NULL,
  615.                       "If not zero - shutdown when finished testing");
  616.         REGISTER_CVAR(e_SQTestDistance, 80, VF_NULL,
  617.                       "Distance to travel");
  618.         REGISTER_CVAR(e_SQTestMip, 1, VF_NULL,
  619.                       "Mip to wait during test");
  620.         REGISTER_CVAR(e_SQTestMoveSpeed, 10, VF_NULL,
  621.                       "Camera speed during test (meters/sec)");
  622.  
  623.         // Small temp pool size for consoles, editor and pc have much larger capabilities
  624.         DefineConstIntCVar(e_3dEngineTempPoolSize, 1024, VF_NULL,
  625.                            "pool size for temporary allocations in kb, requires app restart");
  626.  
  627.         DefineConstIntCVar(e_3dEngineLogAlways, 0, VF_NULL,
  628.                            "Set maximum verbosity to 3dengine.dll log messages");
  629.  
  630.         DefineConstIntCVar(e_CoverCgfDebug, 0, VF_NULL, "Shows the cover setups on cfg files");
  631.  
  632.         REGISTER_CVAR(e_StreamCgfMaxTasksInProgress, 32, VF_CHEAT,
  633.                       "Maximum number of files simultaneously requested from streaming system");
  634.         REGISTER_CVAR(e_StreamCgfMaxNewTasksPerUpdate, 4, VF_CHEAT,
  635.                       "Maximum number of files requested from streaming system per update");
  636.         REGISTER_CVAR(e_StreamPredictionMaxVisAreaRecursion, 9, VF_CHEAT,
  637.                       "Maximum number visareas and portals to traverse.");
  638.         REGISTER_CVAR(e_StreamPredictionBoxRadius, 1, VF_CHEAT, "Radius of stream prediction box");
  639.         REGISTER_CVAR(e_StreamPredictionTexelDensity, 1, VF_CHEAT,
  640.                       "Use mesh texture mapping density info for textures streaming");
  641.         REGISTER_CVAR(e_StreamPredictionAlwaysIncludeOutside, 0, VF_CHEAT,
  642.                       "Always include outside octrees in streaming");
  643.         DefineConstFloatCVar(e_StreamCgfFastUpdateMaxDistance, VF_CHEAT,
  644.                              "Update streaming priorities for near objects every second frame");
  645.         DefineConstFloatCVar(e_StreamPredictionMinFarZoneDistance, VF_CHEAT,
  646.                              "Debug");
  647.         DefineConstFloatCVar(e_StreamPredictionMinReportDistance, VF_CHEAT,
  648.                              "Debug");
  649.         REGISTER_CVAR(e_StreamInstances, 0, VF_CHEAT,
  650.                       "Enable streaming of static world instances (usually vegetation and decals, not used in editor)");
  651.         REGISTER_CVAR(e_StreamInstancesMaxTasks, 32, VF_CHEAT,
  652.                       "Maximum allowed number of file streaming requests for instances streaming (one request reads single octree node)");
  653.         REGISTER_CVAR(e_StreamInstancesDistRatio, 1.f, VF_CHEAT,
  654.                       "Controls streaming distance");
  655.         REGISTER_CVAR_CB(e_StreamCgf, 1, VF_REQUIRE_APP_RESTART,
  656.                          "Enable streaming of static render meshes", OnCGFStreamingChange);
  657.         DefineConstIntCVar(e_StreamCgfDebug, 0, VF_NULL,
  658.                            "Draw helpers and other debug information about CGF streaming\n"
  659.                            " 1: Draw color coded boxes for objects taking more than e_StreamCgfDebugMinObjSize,\n"
  660.                            "    also shows are the LOD's stored in single CGF or were split into several CGF's\n"
  661.                            " 2: Trace into console every loading and unloading operation\n"
  662.                            " 3: Print list of currently active objects taking more than e_StreamCgfDebugMinObjSize KB");
  663.         DefineConstIntCVar(e_StreamCgfDebugMinObjSize, 100, VF_CHEAT,
  664.                            "Threshold for objects debugging in KB");
  665.         DefineConstIntCVar(e_StreamCgfDebugHeatMap, 0, VF_CHEAT,
  666.                            "Generate and show mesh streaming heat map\n"
  667.                            " 1: Generate heat map for entire level\n"
  668.                            " 2: Show last heat map");
  669.         DefineConstFloatCVar(e_StreamPredictionDistanceFar, VF_CHEAT,
  670.                              "Prediction distance for streaming, affects far objects");
  671.         DefineConstFloatCVar(e_StreamPredictionDistanceNear, VF_CHEAT,
  672.                              "Prediction distance for streaming, affets LOD of objects");
  673.         DefineConstFloatCVar(e_StreamCgfVisObjPriority, VF_CHEAT,
  674.                              "Priority boost for visible objects\n"
  675.                              "0 - visible objects has no priority over invisible objects, camera direction does not affect streaming\n"
  676.                              "1 - visible objects has highest priority, in case of trashing will produce even more trashing");
  677.  
  678.         DefineConstFloatCVar(e_StreamCgfGridUpdateDistance, VF_CHEAT,
  679.                              "Update streaming priorities when camera moves more than this value");
  680.  
  681.         DefineConstFloatCVar(e_StreamPredictionAhead, VF_CHEAT,
  682.                              "Use preducted camera position for streaming priority updates");
  683.  
  684.         DefineConstFloatCVar(e_StreamPredictionAheadDebug, VF_CHEAT,
  685.                              "Draw ball at predicted position");
  686.  
  687.         DefineConstIntCVar(e_StreamCgfUpdatePerNodeDistance, 1, VF_CHEAT,
  688.                            "Use node distance as entity distance for far nodex ");
  689.  
  690.         DefineConstIntCVar(e_ScissorDebug, 0, VF_CHEAT,
  691.                            "Debug");
  692.  
  693.         REGISTER_CVAR(e_Brushes, 1, VF_CHEAT | VF_CHEAT_ALWAYS_CHECK,
  694.                       "Draw brushes");
  695.  
  696.         //  REGISTER_CVAR(e_SceneMerging, 0, VF_CHEAT,
  697.         //      "Merge brushes on level loading");
  698.         //  REGISTER_CVAR(e_SceneMergingViewDistRatio, 3.f, VF_CHEAT,
  699.         //  "Controls size of rendered nodes depends from distance");
  700.         //  REGISTER_CVAR(e_SceneMergingMinNodeSize, 16.f, VF_CHEAT,
  701.         //  "Min size of merge area (smallest areas are used near camera)");
  702.         //  REGISTER_CVAR(e_SceneMergingMaxTrisPerInputChunk, 100, VF_CHEAT,
  703.         //  "Merge only chunks containing less than X triangles");
  704.         /*      REGISTER_CVAR(e_scene_merging_compact_vertices, 1, VF_NULL,
  705.             "Minimize number of vertices in decals and merged brushes");
  706.            REGISTER_CVAR(e_scene_merging_show_onlymerged, 0, VF_CHEAT,
  707.             "Show only merged brushes");
  708.            REGISTER_CVAR(e_scene_merging_max_tris_in_chunk, 64, VF_NULL,
  709.             "Only objects having less than X triangles per chunk will me merged");
  710.            REGISTER_CVAR(e_scene_merging_max_time_ms, 5, VF_NULL,
  711.             "Spend only X ms per frame on merging");
  712.            REGISTER_CVAR(e_scene_merging_min_merge_distance, 0, VF_NULL,
  713.             "Don't merge nodes closer than X");*/
  714.  
  715.         REGISTER_CVAR(e_OnDemandPhysics, 1, VF_NULL,
  716.                       "Turns on on-demand physicalization (0=off, 1=vegetation only[default], 2=brushes only, 3=brushes&vegetation");
  717.         REGISTER_CVAR(e_OnDemandMaxSize, 20.0f, VF_NULL,
  718.                       "Specifies the maximum size of vegetation objects that are physicalized on-demand");
  719.         DefineConstIntCVar(e_Sleep, 0, VF_CHEAT,
  720.                            "Sleep X in C3DEngine::Draw");
  721.         REGISTER_CVAR(e_ObjectLayersActivation, (m_bEditor ? 0 : 1), VF_CHEAT, "Allow game to activate/deactivate object layers");
  722.         DefineConstIntCVar(e_ObjectLayersActivationPhysics, 1, VF_CHEAT,
  723.                            "Allow game to create/free physics of objects: 0: Disable; 1: All; 2: Water only.");
  724.         DefineConstIntCVar(e_Objects, 1, VF_CHEAT,
  725.                            "Render or not all objects");
  726.         DefineConstIntCVar(e_Render, e_RenderDefault, VF_CHEAT,
  727.                            "Enable engine rendering");
  728.         DefineConstIntCVar(e_ObjectsTreeBBoxes, 0, VF_CHEAT,
  729.                            "Debug draw of object tree bboxes");
  730.         REGISTER_CVAR(e_ObjectsTreeNodeMinSize, 8.f, VF_CHEAT,
  731.                       "Controls objects tree balancing");
  732.         REGISTER_CVAR(e_ObjectsTreeNodeSizeRatio, 1.f / 8.f, VF_CHEAT,
  733.                       "Controls objects tree balancing");
  734.         /*  REGISTER_CVAR(e_obj_tree_min_node_size, 0, VF_CHEAT,
  735.             "Debug draw of object tree bboxes");
  736.            REGISTER_CVAR(e_obj_tree_max_node_size, 0, VF_CHEAT,
  737.             "Debug draw of object tree bboxes");*/
  738.         REGISTER_CVAR(e_StatObjBufferRenderTasks, 1, VF_NULL,
  739.                       "1 - occlusion test on render node level, 2 - occlusion test on render mesh level");
  740.         REGISTER_CVAR(e_CheckOcclusion, 1, VF_NULL, "Perform a visible check in check occlusion job");
  741.  
  742. #if CRY_PLATFORM_WINDOWS && CRY_PLATFORM_64BIT // for big dense levels and for editor
  743.         #define DEFAULT_CHECK_OCCLUSION_QUEUE_SIZE        4096
  744.         #define DEFAULT_CHECK_OCCLUSION_OUTPUT_QUEUE_SIZE 32768
  745. #else
  746.         #define DEFAULT_CHECK_OCCLUSION_QUEUE_SIZE        1024
  747.         #define DEFAULT_CHECK_OCCLUSION_OUTPUT_QUEUE_SIZE 4096
  748. #endif
  749.  
  750.         REGISTER_CVAR(e_CheckOcclusionQueueSize, DEFAULT_CHECK_OCCLUSION_QUEUE_SIZE, VF_NULL,
  751.                       "Size of queue for data send to check occlusion job");
  752.         REGISTER_CVAR(e_CheckOcclusionOutputQueueSize, DEFAULT_CHECK_OCCLUSION_OUTPUT_QUEUE_SIZE, VF_NULL,
  753.                       "Size of queue for data send from check occlusion job");
  754.         REGISTER_CVAR(e_StatObjTessellationMode, 1, VF_CHEAT,
  755.                       "Set they way pre-tessellated version of meshes is created: 0 = no pre-tessellation, 1 = load from disk, 2 = generate from normal mesh on loading");
  756.         DefineConstIntCVar(e_ObjStats, 0, VF_CHEAT,
  757.                            "Show instances count");
  758.         DefineConstIntCVar(e_ObjFastRegister, 1, VF_CHEAT,
  759.                            "Debug");
  760.  
  761.         DefineConstIntCVar(e_OcclusionLazyHideFrames, 0, VF_CHEAT,
  762.                            "Makes less occluson tests, but it takes more frames to detect invisible objects");
  763.         DefineConstIntCVar(e_OcclusionVolumes, e_OcclusionVolumesDefault, VF_CHEAT,
  764.                            "Enable occlusion volumes(antiportals)");
  765.         DefineConstFloatCVar(e_OcclusionVolumesViewDistRatio, VF_NULL,
  766.                              "Controls how far occlusion volumes starts to occlude objects");
  767.  
  768.         DefineConstIntCVar(e_PrecacheLevel, 0, VF_NULL,
  769.                            "Pre-render objects right after level loading");
  770.  
  771.         DefineConstIntCVar(e_Lods, 1, VF_NULL,
  772.                            "Load and use LOD models for static geometry");
  773.         DefineConstIntCVar(e_LodFaceArea, 1, VF_NULL,
  774.                            "Use geometric mean of faces area to compute LOD");
  775.         DefineConstIntCVar(e_LodsForceUse, 1, VF_NULL,
  776.                            "Force using LODs even if triangle count do not suit");
  777.  
  778.         REGISTER_CVAR(e_SQTestDelay, 5.f, VF_NULL,
  779.                       "Time to stabilize the system before camera movements");
  780.  
  781.         REGISTER_CVAR(e_ProcVegetation, 1, VF_NULL,
  782.                       "Show procedurally distributed vegetation");
  783.         REGISTER_CVAR(e_ProcVegetationMaxViewDistance, 128, VF_NULL,
  784.                       "Maximum distance where procedural objects may be spawn for heightmap quad-tree level 0, every next level multiply it by 2");
  785.         REGISTER_CVAR(e_ProcVegetationMaxCacheLevels, 1, VF_REQUIRE_APP_RESTART,
  786.                       "Number of heightmap quad-tree levels used for vegetation spawning");
  787.         REGISTER_CVAR(e_ProcVegetationMaxSectorsInCache, 16, VF_REQUIRE_APP_RESTART,
  788.                       "Maximum number of 64x64 meter sectors cached in memory");
  789.         REGISTER_CVAR(e_ProcVegetationMaxChunksInCache, 128, VF_REQUIRE_APP_RESTART,
  790.                       "Maximum number of object chunks cached in memory");
  791.         REGISTER_CVAR(e_ProcVegetationMaxObjectsInChunk, 1024, VF_REQUIRE_APP_RESTART,
  792.                       "Maximum number of instances per chunk");
  793.  
  794.         DefineConstIntCVar(e_Recursion, 1, VF_NULL,
  795.                            "If 0 - will skip recursive render calls like render into texture");
  796.         REGISTER_CVAR(e_RecursionViewDistRatio, 0.1f, VF_NULL,
  797.                       "Set all view distances shorter by factor of X");
  798.  
  799.         REGISTER_CVAR(e_Clouds, 0, VF_NULL,
  800.                       "Enable clouds rendering");
  801.  
  802.         REGISTER_CVAR(e_SkyUpdateRate, 0.12f, VF_NULL,
  803.                       "Percentage of a full dynamic sky update calculated per frame (0..100].");
  804.         DefineConstIntCVar(e_SkyQuality, 1, VF_NULL,
  805.                            "Quality of dynamic sky: 1 (very high), 2 (high).");
  806.         DefineConstIntCVar(e_SkyType, 1, VF_NULL,
  807.                            "Type of sky used: 0 (static), 1 (dynamic).");
  808.  
  809.         DefineConstIntCVar(e_DisplayMemoryUsageIcon, e_DisplayMemoryUsageIconDefault, VF_NULL,
  810.                            "Turns On/Off the memory usage icon rendering: 1 on, 0 off.");
  811.  
  812.         REGISTER_CVAR(e_LodRatio, 6.0f, VF_NULL,
  813.                                                                 "LOD distance ratio for objects");
  814.         REGISTER_CVAR(e_LodTransitionTime, 0.5f, VF_NULL,
  815.                                                                 "If non 0 - use dissolve for smooth LOD transition");
  816.         REGISTER_CVAR(e_LodFaceAreaTargetSize, 0.005f, VF_NULL,
  817.                       "Threshold used for LOD computation.");
  818.         DefineConstFloatCVar(e_LodCompMaxSize, VF_NULL,
  819.                              "Affects LOD selection for big objects, small number will switch more objects into lower LOD");
  820.         REGISTER_CVAR(e_ViewDistRatio, 60.0f, VF_CVARGRP_IGNOREINREALVAL | VF_LIVE_CREATE_SYNCED,
  821.                       "View distance ratio for objects");
  822.         DefineConstFloatCVar(e_ViewDistCompMaxSize, VF_NULL | VF_LIVE_CREATE_SYNCED,
  823.                              "Affects max view distance for big objects, small number will render less objects");
  824.         DefineConstFloatCVar(e_ViewDistRatioPortals, VF_NULL | VF_LIVE_CREATE_SYNCED,
  825.                              "View distance ratio for portals");
  826.         REGISTER_CVAR(e_ViewDistRatioDetail, 30.0f, VF_NULL | VF_LIVE_CREATE_SYNCED,
  827.                       "View distance ratio for detail objects");
  828.         REGISTER_CVAR(e_ViewDistRatioVegetation, 30.0f, VF_CVARGRP_IGNOREINREALVAL | VF_LIVE_CREATE_SYNCED,
  829.                       "View distance ratio for vegetation");
  830.         REGISTER_CVAR(e_ViewDistRatioLights, 50.0f, VF_NULL | VF_LIVE_CREATE_SYNCED,
  831.                       "View distance ratio for light sources");
  832.         REGISTER_CVAR(e_ViewDistRatioCustom, 60.0f, VF_NULL | VF_LIVE_CREATE_SYNCED,
  833.                       "View distance ratio for special marked objects (Players,AI,Vehicles)");
  834.         REGISTER_CVAR(e_ViewDistMin, 0.0f, VF_NULL | VF_LIVE_CREATE_SYNCED,
  835.                       "Min distance on what far objects will be culled out");
  836.         REGISTER_CVAR(e_LodMin, 0, VF_NULL,
  837.                       "Min LOD for objects");
  838.         REGISTER_CVAR(e_CharLodMin, 0, VF_NULL,
  839.                       "Min LOD for character objects");
  840.         REGISTER_CVAR(e_LodMax, MAX_STATOBJ_LODS_NUM - 1, VF_CHEAT,
  841.                       "Max LOD for objects");
  842.         DefineConstIntCVar(e_LodMinTtris, 300, VF_CHEAT,
  843.                            "LODs with less triangles will not be used");
  844.         DefineConstIntCVar(e_DebugLights, 0, VF_CHEAT,
  845.                            "Use different colors for objects affected by different number of lights\n"
  846.                            "black:0, blue:1, green:2, red:3 or more, blinking yellow: more then the maximum enabled\n"
  847.                            "Obsolete for deferred lights. Use r_DeferredShadingDebug.");
  848.         REGISTER_CVAR(e_PhysMinCellSize, 4, VF_NULL,
  849.                       "Min size of cell in physical entity grid");
  850.         REGISTER_CVAR(e_PhysProxyTriLimit, 5000, VF_NULL,
  851.                       "Maximum allowed triangle count for phys proxies");
  852.         DefineConstIntCVar(e_PhysFoliage, 2, VF_NULL,
  853.                            "Enables physicalized foliage\n"
  854.                            "1 - only for dynamic objects\n"
  855.                            "2 - for static and dynamic)");
  856.         DefineConstIntCVar(e_RenderMeshUpdateAsync, 1, VF_NULL,
  857.                            "Enables async updating of dynamically updated rendermeshes\n"
  858.                            "0 - performs a synchronous update\n"
  859.                            "1 - performs the update in an async job (default))");
  860.         DefineConstFloatCVar(e_FoliageStiffness, VF_NULL,
  861.                              "Stiffness of the spongy obstruct geometry");
  862.         DefineConstFloatCVar(e_FoliageBranchesStiffness, VF_NULL,
  863.                              "Stiffness of branch ropes");
  864.         DefineConstFloatCVar(e_FoliageBranchesDamping, VF_NULL,
  865.                              "Damping of branch ropes");
  866.         DefineConstFloatCVar(e_FoliageBrokenBranchesDamping, VF_NULL,
  867.                              "Damping of branch ropes of broken vegetation");
  868.         REGISTER_CVAR(e_FoliageBranchesTimeout, 4.f, VF_NULL,
  869.                       "Maximum lifetime of branch ropes (if there are no collisions)");
  870.         REGISTER_CVAR(e_FoliageWindActivationDist, 0, VF_NULL,
  871.                       "If the wind is sufficiently strong, visible foliage in this view dist will be forcefully activated");
  872.  
  873.         DefineConstIntCVar(e_DeformableObjects, e_DeformableObjectsDefault, VF_NULL,
  874.                            "Enable / Disable morph based deformable objects");
  875.  
  876.         REGISTER_CVAR(e_CullVegActivation, 200, VF_NULL,
  877.                       "Vegetation activation distance limit; 0 disables visibility-based culling (= unconditional activation)");
  878.  
  879.         REGISTER_CVAR(e_PhysOceanCell, e_PhysOceanCellDefault, VF_NULL,
  880.                       "Cell size for ocean approximation in physics, 0 assumes flat plane");
  881.  
  882.         DefineConstFloatCVar(e_JointStrengthScale, VF_NULL,
  883.                              "Scales the strength of prebroken objects\' joints (for tweaking)");
  884.  
  885.         DefineConstFloatCVar(e_VolObjShadowStrength, VF_NULL,
  886.                              "Self shadow intensity of volume objects [0..1].");
  887.  
  888.         DefineConstIntCVar(e_ScreenShot, 0, VF_NULL,
  889.                            "Make screenshot combined up of multiple rendered frames\n"
  890.                            "(negative values for multiple frames, positive for a a single frame)\n"
  891.                            " 1 highres\n"
  892.                            " 2 360 degree panorama\n"
  893.                            " 3 Map top-down view\n"
  894.                            "\n"
  895.                            "see:\n"
  896.                            "  e_ScreenShotWidth, e_ScreenShotHeight, e_ScreenShotQuality, e_ScreenShotMapCenterX,\n"
  897.                            "  e_ScreenShotMapCenterY, e_ScreenShotMapSize, e_ScreenShotMinSlices, e_ScreenShotDebug");
  898.  
  899.         REGISTER_CVAR(e_ScreenShotWidth, 2000, VF_NULL,
  900.                       "used for all type highres screenshots made by e_ScreenShot to define the\n"
  901.                       "width of the destination image, 2000 default");
  902.         REGISTER_CVAR(e_ScreenShotHeight, 1500, VF_NULL,
  903.                       "used for all type highres screenshots made by e_ScreenShot to define the\n"
  904.                       "height of the destination image, 1500 default");
  905.         REGISTER_CVAR(e_ScreenShotQuality, 30, VF_NULL,
  906.                       "used for all type highres screenshots made by e_ScreenShot to define the quality\n"
  907.                       "0=fast, 10 .. 30 .. 100 = extra border in percent (soften seams), negative value to debug");
  908.         REGISTER_CVAR(e_ScreenShotMinSlices, 1, VF_NULL,
  909.                       "used for all type highres screenshots made by e_ScreenShot to define the amount\n"
  910.                       "of sub-screenshots for the width and height to generate the image,\n the min count\n"
  911.                       "will be automatically raised if not sufficient (per screenshot-based)");
  912.         REGISTER_CVAR(e_ScreenShotMapCenterX, 0.0f, VF_NULL,
  913.                       "param for the centerX position of the camera, see e_ScreenShotMap\n"
  914.                       "defines the x position of the top left corner of the screenshot-area on the terrain,\n"
  915.                       "0.0 - 1.0 (0.0 is default)");
  916.         REGISTER_CVAR(e_ScreenShotMapCenterY, 0.0f, VF_NULL,
  917.                       "param for the centerX position of the camera, see e_ScreenShotMap\n"
  918.                       "defines the y position of the top left corner of the screenshot-area on the terrain,\n"
  919.                       "0.0 - 1.0 (0.0 is default)");
  920.         REGISTER_CVAR(e_ScreenShotMapSizeX, 1024.f, VF_NULL,
  921.                       "param for the size in worldunits of area to make map screenshot, see e_ScreenShotMap\n"
  922.                       "defines the x position of the bottom right corner of the screenshot-area on the terrain,\n"
  923.                       "0.0 - 1.0 (1.0 is default)");
  924.         REGISTER_CVAR(e_ScreenShotMapSizeY, 1024.f, VF_NULL,
  925.                       "param for the size in worldunits of area to make map screenshot, see e_ScreenShotMap\n"
  926.                       "defines the x position of the bottom right corner of the screenshot-area on the terrain,\n"
  927.                       "0.0 - 1.0 (1.0 is default)");
  928.         REGISTER_CVAR(e_ScreenShotMapCamHeight, 4000.f, VF_NULL,
  929.                       "param for top-down-view screenshot creation, defining the camera height for screenshots,\n"
  930.                       "see e_ScreenShotMap defines the y position of the bottom right corner of the\n"
  931.                       "screenshot-area on the terrain,\n"
  932.                       "0.0 - 1.0 (1.0 is default)");
  933.         REGISTER_CVAR(e_ScreenShotMapOrientation, 0, VF_NULL,
  934.                       "param for rotating the orientation through 90 degrees so the screen shot width is along the X axis\n"
  935.                       "see e_ScreenShotMap\n"
  936.                       "0 - 1 (0 is default)");
  937.         REGISTER_CVAR(e_ScreenShotDebug, 0, VF_NULL,
  938.                       "0 off\n1 show stitching borders\n2 show overlapping areas");
  939.  
  940.         DefineConstIntCVar(e_Ropes, 1, VF_CHEAT,
  941.                            "Turn Rendering of Ropes on/off");
  942.  
  943.         DefineConstIntCVar(e_StatObjValidate, e_StatObjValidateDefault, VF_NULL,
  944.                            "Enable CGF mesh validation during loading");
  945.  
  946.         DefineConstIntCVar(e_StatObjPreload, 1, VF_NULL,
  947.                            "Load level CGF's in efficient way");
  948.  
  949.         DefineConstIntCVar(e_PreloadMaterials, 1, VF_NULL,
  950.                            "Preload level materials from level cache pak and resources list");
  951.         DefineConstIntCVar(e_PreloadDecals, 1, VF_NULL,
  952.                            "Preload all materials for decals");
  953.  
  954.         DefineConstIntCVar(e_StatObjMerge, 1, VF_NULL,
  955.                            "Enable CGF sub-objects meshes merging");
  956.         DefineConstIntCVar(e_StatObjMergeMaxTrisPerDrawCall, 500, VF_NULL,
  957.                            "Skip merging of meshes already having acceptable number of triangles per draw call");
  958.         DefineConstIntCVar(e_StatObjStoreMesh, 0, VF_NULL,
  959.                            "Store the mesh if enabled, used for cheat detection purposes (they will be stored by default on the dedi server)");
  960.  
  961.         DefineConstIntCVar(e_DefaultMaterial, 0, VF_CHEAT,
  962.                            "use gray illumination as default");
  963.  
  964.         REGISTER_CVAR(e_ObjQuality, 0, VF_NULL,
  965.                       "Object detail quality");
  966.         REGISTER_CVAR(e_StaticInstancing, 0, VF_NULL,
  967.                       "Prepare and cache instancing info (mostly for vegetation)\n"
  968.                       "2 = Show only instanced objects\n"
  969.                       "3 = Show only instanced objects and bounding boxes\n"
  970.                       "4 = Show only non instanced objects\n");
  971.         REGISTER_CVAR(e_StaticInstancingMinInstNum, 32, VF_NULL,
  972.                       "Minimum number of objects for grouping");
  973.         REGISTER_CVAR(e_ParticlesQuality, 0, VF_NULL,
  974.                       "Particles detail quality");
  975.         REGISTER_CVAR(e_ObjShadowCastSpec, 0, VF_NULL,
  976.                       "Object shadow casting spec. Only objects with Shadow Cast Spec <= e_ObjShadowCastSpec will cast shadows");
  977.  
  978.         REGISTER_CVAR(e_ParticlesPoolSize, 16 << 10, VF_CHEAT | VF_CHEAT_NOCHECK,
  979.                       "Particle system pool memory size in KB");
  980.  
  981.         DefineConstIntCVar(e_ParticlesLights, 1, VF_NULL,
  982.                            "Allows to have light source attached to every particle\n"
  983.                            "0 = Off\n"
  984.                            "1 = Deferred lights\n");
  985.  
  986.         DefineConstFloatCVar(e_ParticlesLightsViewDistRatio, VF_NULL,
  987.                              "Set particles lights view distance ratio");
  988.  
  989.         DefineConstIntCVar(e_LightVolumes, e_LightVolumesDefault, VF_NULL,
  990.                            "Allows deferred lighting for registered alpha blended geometry\n"
  991.                            "0 = Off\n"
  992.                            "1 = Enabled\n"
  993.                            "2 = Enabled just for sun light\n");
  994.  
  995.         DefineConstIntCVar(e_LightVolumesDebug, 0, VF_NULL,
  996.                            "Display light volumes debug info\n"
  997.                            "0 = Off\n"
  998.                            "1 = Enabled\n");
  999.  
  1000.         REGISTER_CVAR(e_ParticlesUseLevelSpecificLibs, 0, VF_NULL,
  1001.                       "Allows searching for level-specific version of effects files\n"
  1002.                       "0 = Off\n"
  1003.                       "1 = Enabled\n");
  1004.  
  1005.         REGISTER_CVAR(e_ParticlesAnimBlend, 1, VF_NULL,
  1006.                       "Blend between animated texture frames\n"
  1007.                       "Usage: e_ParticlesAnimBlend [0/1/2]\n"
  1008.                       "0 = Off\n"
  1009.                       "1 = On\n"
  1010.                       "2 = Force");
  1011.  
  1012.         REGISTER_CVAR(e_ParticlesGI, 1, VF_NULL,
  1013.                       "Apply global illumination to appropriate particle effects\n"
  1014.                       "Usage: e_ParticlesGI [0/1/2]\n"
  1015.                       "0 = Off\n"
  1016.                       "1 = On\n"
  1017.                       "2 = Force");
  1018.  
  1019.         REGISTER_CVAR(e_ParticlesSoftIntersect, 1, VF_NULL,
  1020.                       "Render appropriate particles with soft intersection\n"
  1021.                       "Usage: e_ParticlesSoftIntersect [0/1/2]\n"
  1022.                       "0 = Off\n"
  1023.                       "1 = On\n"
  1024.                       "2 = Force");
  1025.  
  1026.         REGISTER_CVAR(e_ParticlesMotionBlur, 1, VF_NULL,
  1027.                       "Motion blur for particles\n"
  1028.                       "Usage: e_ParticlesMotionBlur [0/1/2]\n"
  1029.                       "0 = Off\n"
  1030.                       "1 = On\n"
  1031.                       "2 = Force");
  1032.  
  1033.         REGISTER_CVAR(e_ParticlesShadows, 1, VF_NULL,
  1034.                       "Shadows on particles\n"
  1035.                       "Usage: e_ParticlesShadows [0/1/2]\n"
  1036.                       "0 = Off\n"
  1037.                       "1 = On\n"
  1038.                       "2 = Force");
  1039.  
  1040.         REGISTER_CVAR(e_ParticlesAudio, 1, VF_CHEAT,
  1041.                       "Toggles audio on particles on or off.\n"
  1042.                       "Usage: e_ParticlesAudio [0/1]\n"
  1043.                       "0 = Off\n"
  1044.                       "1 = On (Default)\n");
  1045.  
  1046.         REGISTER_CVAR(e_ParticleShadowsNumGSMs, 3, VF_NULL,
  1047.                       "Number of shadow GSMs used for particle shadows");
  1048.  
  1049.         e_ScreenShotFileFormat = REGISTER_STRING("e_ScreenShotFileFormat", "tga", VF_NULL,
  1050.                                                  "Set output image file format for hires screen shots. Can be JPG or TGA");
  1051.         e_SQTestTextureName = REGISTER_STRING("e_SQTestTextureName", "strfrn_advrt_boards_screen", VF_NULL,
  1052.                                               "Reference texture name for streaming latency test");
  1053.         e_StreamCgfDebugFilter = REGISTER_STRING("e_StreamCgfDebugFilter", "", VF_NULL,
  1054.                                                  "Show only items containing specified text");
  1055.  
  1056.         e_CameraGoto = REGISTER_STRING("e_CameraGoto", "0", VF_CHEAT,
  1057.                                        "Move cameras to a certain pos/angle");
  1058.         e_DebugDrawFilter = REGISTER_STRING("e_DebugDrawFilter", "", VF_NULL,
  1059.                                             "Show a specified text on DebugDraw");
  1060.  
  1061.         REGISTER_CVAR_CB(e_TimeOfDay, 0.0f, VF_CHEAT | VF_CHEAT_NOCHECK, "Current Time of Day", OnTimeOfDayVarChange);
  1062.         REGISTER_CVAR_CB(e_TimeOfDaySpeed, 0.0f, VF_CHEAT | VF_CHEAT_NOCHECK, "Time of Day change speed", OnTimeOfDaySpeedVarChange);
  1063.         DefineConstIntCVar(e_TimeOfDayDebug, 0, VF_NULL,
  1064.                            "Display time of day current values on screen");
  1065.  
  1066.         DefineConstFloatCVar(e_CameraRotationSpeed, VF_CHEAT,
  1067.                              "Rotate camera around Z axis for debugging");
  1068.         DefineConstIntCVar(e_CameraFreeze, 0, VF_CHEAT,
  1069.                            "Freeze 3dengine camera (good to debug object culling and LOD).\n"
  1070.                            "The view frustum is drawn in write frame.\n"
  1071.                            " 0 = off\n"
  1072.                            " 1 = activated");
  1073.  
  1074.         REGISTER_CVAR(e_GI, 0, VF_CVARGRP_IGNOREINREALVAL,
  1075.                       "Enable/disable global illumination. Default: 1 - enabled");
  1076.  
  1077.         REGISTER_CVAR(e_RenderMeshCollisionTolerance, 0.3f, VF_NULL,
  1078.                       "Min distance between physics-proxy and rendermesh before collision is considered a hole");
  1079.  
  1080.         DefineConstIntCVar(e_PrepareDeformableObjectsAtLoadTime, 0, VF_CHEAT,
  1081.                            "Enable to Prepare deformable objects at load time instead on demand, prevents peaks but increases memory usage");
  1082.  
  1083.         DefineConstIntCVar(e_DeferredPhysicsEvents, 1, VF_CHEAT,
  1084.                            "Enable to Perform some physics events deferred as a task/job");
  1085.  
  1086.         REGISTER_CVAR(e_levelStartupFrameNum, 0, VF_NULL,
  1087.                       "Set to number of frames to capture for avg fps computation");
  1088.  
  1089.         REGISTER_CVAR(e_levelStartupFrameDelay, 0, VF_NULL,
  1090.                       "Set to number of frames to wait after level load before beginning fps measuring");
  1091.  
  1092.         REGISTER_CVAR(e_CacheNearestCubePicking, 1, VF_NULL,
  1093.                       "Enable caching nearest cube maps probe picking for alpha blended geometry");
  1094.  
  1095.         REGISTER_CVAR(e_CGFMaxFileSize, -1, VF_CHEAT,
  1096.                       "will refuse to load any cgf larger than the given filesize (in kb)\n"
  1097.                       "-1 - 1024 (<0 off (default), >0 filesize limit)");
  1098.  
  1099.         REGISTER_CVAR(e_MaxDrawCalls, 0, VF_CHEAT,
  1100.                       "Will not render CGFs past the given amount of drawcalls\n"
  1101.                       "(<=0 off (default), >0 draw calls limit)");
  1102.  
  1103.         int defaultMergedMeshesValue = 1;
  1104. #if defined(DEDICATED_SERVER)
  1105.         defaultMergedMeshesValue = 0;
  1106. #endif
  1107.         REGISTER_CVAR(e_MergedMeshes, defaultMergedMeshesValue, VF_NULL, "Show runtime merged meshes");
  1108.         REGISTER_CVAR(e_MergedMeshesDebug, 0, VF_NULL,
  1109.                       "enable debug drawing of runtime merged meshes\n"
  1110.                       "2: Show AABB + debug info (position, state, size, visibility)\n"
  1111.                       "64: Show the calculated wind\n"
  1112.                       "256: Draw colliders of objects influencing the merged meshes\n"
  1113.                       "544: Draw spines\n"
  1114.                       "1056: Draw simulated spines\n"
  1115.                       "2080: Draw spines with LOD info (red/blue)\n");
  1116.         REGISTER_CVAR(e_MergedMeshesPool, 2750, VF_NULL, "amount of mainmeory (in kb) that merged meshes are allowed to sustain");
  1117.         REGISTER_CVAR(e_MergedMeshesPoolSpines, 32, VF_NULL, "percentage of the pool for spines");
  1118.         REGISTER_CVAR(e_MergedMeshesTesselationSupport, 0, VF_NULL, "Enable or disable support for tesselation on mergedmeshes");
  1119.         REGISTER_CVAR(e_MergedMeshesViewDistRatio, 30.f, VF_NULL, "merged meshes view dist ratio");
  1120.         REGISTER_CVAR(e_MergedMeshesLodRatio, 3.f, VF_NULL, "merged meshes lod ratio");
  1121.         REGISTER_CVAR(e_MergedMeshesDeformViewDistMod, 0.45f, VF_NULL, "distance modifier applied to view dist ratios after which deformables stop updating");
  1122.         REGISTER_CVAR(e_MergedMeshesInstanceDist, 4.5f, VF_NULL, "Distance fudge factor at which merged meshes turn off animation");
  1123.         REGISTER_CVAR(e_MergedMeshesActiveDist, 250.f, VF_NULL, "Active distance up until merged mesh patches will be streamed in");
  1124.         REGISTER_CVAR(e_MergedMeshesUseSpines, 1, VF_NULL, "MergedMeshes use touchbending");
  1125.         REGISTER_CVAR(e_MergedMeshesBulletSpeedFactor, 0.05f, VF_NULL, "MergedMesh Bullet approximations speed factor");
  1126.         REGISTER_CVAR(e_MergedMeshesBulletScale, 35.f, VF_NULL, "MergedMesh Bullet approximations size scale");
  1127.         REGISTER_CVAR(e_MergedMeshesBulletLifetime, 0.15f, VF_NULL, "MergedMesh Bullet approximations lifetime");
  1128.         REGISTER_CVAR(e_MergedMeshesOutdoorOnly, 0, VF_NULL, "MergedMeshes will recieve ERF_OUTDOORONLY by default");
  1129.         REGISTER_CVAR(e_CheckOctreeObjectsBoxSize, 1, VF_NULL, "CryWarning for crazy sized COctreeNode m_objectsBoxes");
  1130.         REGISTER_CVAR(e_DebugGeomPrep, 0, VF_NULL, "enable logging of Geom preparation");
  1131.         DefineConstIntCVar(e_GeomCaches, 1, VF_NULL, "Activates drawing of geometry caches");
  1132.         REGISTER_CVAR(e_GeomCacheBufferSize, 128, VF_CHEAT, "Geometry cache stream buffer upper limit size in MB. Default: 128");
  1133.         REGISTER_CVAR(e_GeomCacheMaxPlaybackFromMemorySize, 16, VF_CHEAT,
  1134.                       "Maximum size of geometry cache animated data in MB before always streaming from disk ignoring the memory playback flag. Default: 16");
  1135.         REGISTER_CVAR(e_GeomCachePreferredDiskRequestSize, 1024, VF_CHEAT,
  1136.                       "Preferred disk request size for geometry cache streaming in KB. Default: 1024");
  1137.         REGISTER_CVAR(e_GeomCacheMinBufferAheadTime, 2.0f, VF_CHEAT,
  1138.                       "Time in seconds minimum that data will be buffered ahead for geom cache streaming. Default: 2.0");
  1139.         REGISTER_CVAR(e_GeomCacheMaxBufferAheadTime, 5.0f, VF_CHEAT,
  1140.                       "Time in seconds maximum that data will be buffered ahead for geom cache streaming. Default: 5.0");
  1141.         REGISTER_CVAR(e_GeomCacheDecodeAheadTime, 0.5f, VF_CHEAT,
  1142.                       "Time in seconds that data will be decoded ahead for geom cache streaming. Default: 0.5");
  1143. #ifndef _RELEASE
  1144.         DefineConstIntCVar(e_GeomCacheDebug, 0, VF_CHEAT, "Show geometry cache debug overlay. Default: 0");
  1145.         e_GeomCacheDebugFilter = REGISTER_STRING("e_GeomCacheDebugFilter", "", VF_CHEAT, "Set name filter for e_geomCacheDebug");
  1146.         DefineConstIntCVar(e_GeomCacheDebugDrawMode, 0, VF_CHEAT, "Geometry cache debug draw mode\n"
  1147.                                                                   " 0 = normal\n"
  1148.                                                                   " 1 = only animated meshes\n"
  1149.                                                                   " 2 = only static meshes\n"
  1150.                                                                   " 3 = debug instancing");
  1151.         REGISTER_CVAR_DEV_ONLY(e_MergedMeshesClusterVisualization, 0, VF_NULL,
  1152.                                "Activates drawing of clusters calculated around merged mesh type vegetation.\n"
  1153.                                "0 = off\n"
  1154.                                "1 = runtime areas only (use Y key for temporary drawing of clusters)\n"
  1155.                                "2 = runtime areas + clusters around vegetation patches");
  1156.         REGISTER_CVAR_DEV_ONLY(e_MergedMeshesClusterVisualizationDimension, 32, VF_NULL,
  1157.                                "Area around the camera in which the clusters should be visible. (high number == slow!\n"
  1158.                                "Note: max value is 255");
  1159. #endif
  1160.         DefineConstIntCVar(e_GeomCacheLerpBetweenFrames, 1, VF_CHEAT, "Interpolate between geometry cache frames. Default: 1");
  1161.  
  1162. #if defined(FEATURE_SVO_GI)
  1163.         RegisterTICVars();
  1164. #endif
  1165. }
  1166.  
downloadcvars.cpp Source code - Download CRYENGINE Source code
Related Source Codes/Software:
postal - 2017-06-11
reactide - Reactide is the first dedicated IDE for React web ... 2017-06-11
rkt - rkt is a pod-native container engine for Linux. It... 2017-06-11
uWebSockets - Tiny WebSockets https://for... 2017-06-11
realworld - TodoMVC for the RealWorld - Exemplary fullstack Me... 2017-06-11
CRYENGINE - CRYENGINE is a powerful real-time game development... 2017-06-11
goreplay - GoReplay is an open-source tool for capturing and ... 2017-06-10
pyenv - Simple Python version management 2017-06-10
redux-saga - An alternative side effect model for Redux apps ... 2017-06-10
angular-starter - 2017-06-10

 Back to top