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