@@ -387,6 +387,91 @@ public static Map<String, KCVar.Group> CVars()
387387 )
388388 );
389389
390+
391+ KCVar .Group QC_CVARS = new KCVar .Group ("QC" , true )
392+ .AddCVar (
393+ KCVar .CreateCVar ("harm_r_clearVertexBuffer" , "integer" , "2" , "Clear vertex buffer on every frame" , KCVar .FLAG_LAUNCHER ,
394+ "0" , "Not clear(original)" ,
395+ "1" , "Only free memory" ,
396+ "2" , "Free memory and delete VBO handle"
397+ ),
398+ KCVar .CreateCVar ("harm_r_maxAllocStackMemory" , "integer" , "262144" , "Control allocate temporary memory when load model data. 0 = Always heap; Negative = Always stack; Positive = Max stack memory limit(If less than this `byte` value, call `alloca` in stack memory, else call `malloc`/`calloc` in heap memory)" , 0 ),
399+ KCVar .CreateCVar ("harm_r_shaderProgramDir" , "string" , "glslprogs" , "Special external OpenGLES2.0 GLSL shader program directory path" , 0 ),
400+ KCVar .CreateCVar ("harm_r_shaderProgramES3Dir" , "string" , "glsl3progs" , "Special external OpenGLES3.0 GLSL shader program directory path" , 0 ),
401+
402+ KCVar .CreateCVar ("harm_r_shadowCarmackInverse" , "bool" , "0" , "Stencil shadow using Carmack-Inverse" , 0 ),
403+ KCVar .CreateCVar ("harm_r_lightingModel" , "string" , "1" , "Lighting model when draw interactions" , KCVar .FLAG_LAUNCHER ,
404+ "1" , "Phong" ,
405+ "2" , "Blinn-Phong" ,
406+ "3" , "PBR" ,
407+ "4" , "Ambient" ,
408+ "0" , "No lighting"
409+ ),
410+ KCVar .CreateCVar ("harm_r_specularExponent" , "float" , "3.0" , "Specular exponent in Phong interaction lighting model" , KCVar .FLAG_POSITIVE | KCVar .FLAG_LAUNCHER ),
411+ KCVar .CreateCVar ("harm_r_specularExponentBlinnPhong" , "float" , "12.0" , "Specular exponent in Blinn-Phong interaction lighting model" , KCVar .FLAG_POSITIVE | KCVar .FLAG_LAUNCHER ),
412+ KCVar .CreateCVar ("harm_r_specularExponentPBR" , "float" , "5.0" , "Specular exponent in PBR interaction lighting model" , KCVar .FLAG_POSITIVE | KCVar .FLAG_LAUNCHER ),
413+ KCVar .CreateCVar ("harm_r_PBRNormalCorrection" , "float" , "0.25" , "Vertex normal correction(surface smoothness) in PBR interaction lighting model(1 = pure using bump texture(lower smoothness); 0 = pure using vertex normal(high smoothness); 0.0 - 1.0 = bump texture * harm_r_PBRNormalCorrection + vertex normal * (1 - harm_r_PBRNormalCorrection))" , KCVar .FLAG_POSITIVE | KCVar .FLAG_LAUNCHER ),
414+ KCVar .CreateCVar ("harm_r_PBRRoughnessCorrection" , "float" , "0.55" , "max roughness for old specular texture. 0 = disable; else = roughness = harm_r_PBRRoughnessCorrection - texture(specularTexture, st).r" , 0 ),
415+ KCVar .CreateCVar ("harm_r_PBRMetallicCorrection" , "float" , "0" , "min metallic for old specular texture. 0 = disable; else = metallic = texture(specularTexture, st).r + harm_r_PBRMetallicCorrection" , 0 ),
416+ KCVar .CreateCVar ("harm_r_PBRRMAOSpecularMap" , "bool" , "0" , "Specular map is standard PBR RAMO texture or old non-PBR texture" , 0 ),
417+ KCVar .CreateCVar ("harm_r_ambientLightingBrightness" , "float" , "1.0" , "Lighting brightness in ambient lighting" , KCVar .FLAG_POSITIVE | KCVar .FLAG_LAUNCHER ),
418+ KCVar .CreateCVar ("r_maxFps" , "integer" , "0" , "Limit maximum FPS. 0 = unlimited" , KCVar .FLAG_POSITIVE | KCVar .FLAG_LAUNCHER ),
419+
420+ KCVar .CreateCVar ("r_screenshotFormat" , "integer" , "0" , "Screenshot format" , 0 ,
421+ "0" , "TGA (default)" ,
422+ "1" , "BMP" ,
423+ "2" , "PNG" ,
424+ "3" , "JPG" ,
425+ "4" , "DDS" ,
426+ "5" , "EXR" ,
427+ "6" , "HDR"
428+ ),
429+ KCVar .CreateCVar ("r_screenshotJpgQuality" , "integer" , "75" , "Screenshot quality for JPG images (0-100)" , KCVar .FLAG_POSITIVE ),
430+ KCVar .CreateCVar ("r_screenshotPngCompression" , "integer" , "3" , "Compression level when using PNG screenshots (0-9)" , KCVar .FLAG_POSITIVE ),
431+
432+ KCVar .CreateCVar ("r_useShadowMapping" , "bool" , "0" , "use shadow mapping instead of stencil shadows" , KCVar .FLAG_LAUNCHER ),
433+ KCVar .CreateCVar ("r_forceShadowMapsOnAlphaTestedSurfaces" , "bool" , "0" , "render perforated surface to shadow map(DOOM 3 default is 1)" , KCVar .FLAG_LAUNCHER ),
434+ KCVar .CreateCVar ("harm_r_shadowMapAlpha" , "float" , "1.0" , "Shadow's alpha in shadow mapping" , KCVar .FLAG_POSITIVE | KCVar .FLAG_LAUNCHER ),
435+ KCVar .CreateCVar ("r_shadowMapJitterScale" , "float" , "2.5" , "scale factor for jitter offset" , KCVar .FLAG_POSITIVE ),
436+ KCVar .CreateCVar ("r_shadowMapSplits" , "integer" , "3" , "number of splits for cascaded shadow mapping with parallel lights(0: disable, max is 4)" , 0 ),
437+ KCVar .CreateCVar ("harm_r_shadowMapCombine" , "bool" , "1" , "combine local and global shadow mapping" , KCVar .FLAG_LAUNCHER ),
438+
439+ KCVar .CreateCVar ("harm_r_stencilShadowTranslucent" , "bool" , "0" , "enable translucent shadow in stencil shadow" , KCVar .FLAG_LAUNCHER ),
440+ KCVar .CreateCVar ("harm_r_stencilShadowAlpha" , "float" , "1.0" , "translucent shadow's alpha in stencil shadow" , KCVar .FLAG_POSITIVE | KCVar .FLAG_LAUNCHER ),
441+ KCVar .CreateCVar ("harm_r_stencilShadowCombine" , "bool" , "0" , "combine local and global stencil shadow" , KCVar .FLAG_LAUNCHER ),
442+ KCVar .CreateCVar ("harm_r_stencilShadowSoft" , "bool" , "0" , "enable soft stencil shadow(Only OpenGLES3.1+)" , KCVar .FLAG_LAUNCHER ),
443+ KCVar .CreateCVar ("harm_r_stencilShadowSoftBias" , "float" , "-1" , "soft stencil shadow sampler BIAS(-1 = automatic; 0 = disable; positive = value)" , 0 ),
444+ KCVar .CreateCVar ("harm_r_stencilShadowSoftCopyStencilBuffer" , "bool" , "0" , "copy stencil buffer directly for soft stencil shadow. 0: copy depth buffer and bind and renderer stencil buffer to texture directly; 1: copy stencil buffer to texture directly" , 0 ),
445+ KCVar .CreateCVar ("harm_r_useHighPrecision" , "integer" , "0" , "Use high precision float on GLSL shader" , KCVar .FLAG_LAUNCHER | KCVar .FLAG_INIT ,
446+ "0" , "use default precision(interaction/depth shaders use high precision, otherwise use medium precision)" ,
447+ "1" , "all shaders use high precision as default precision exclude special variables" ,
448+ "2" , "all shaders use high precision as default precision and special variables also use high precision"
449+ ),
450+ KCVar .CreateCVar ("harm_r_globalIllumination" , "bool" , "0" , "render global illumination before draw lighting interactions" , KCVar .FLAG_LAUNCHER ),
451+ KCVar .CreateCVar ("harm_r_globalIlluminationBrightness" , "float" , "0.3" , "global illumination brightness" , KCVar .FLAG_POSITIVE | KCVar .FLAG_LAUNCHER ),
452+ KCVar .CreateCVar ("r_renderMode" , "integer" , "0" , "Enable retro postprocess rendering" , KCVar .FLAG_LAUNCHER ,
453+ "0" , "None" ,
454+ "1" , "CGA" ,
455+ "2" , "CGA Highres" ,
456+ "3" , "Commodore 64" ,
457+ "4" , "Commodore 64 Highres" ,
458+ "5" , "Amstrad CPC 6128" ,
459+ "6" , "Amstrad CPC 6128 Highres" ,
460+ "7" , "Sega Genesis" ,
461+ "8" , "Sega Genesis Highres" ,
462+ "9" , "Sony PSX"
463+ ),
464+ KCVar .CreateCVar ("harm_r_useGLSLShaderBinaryCache" , "integer" , "0" , "Use/cache GLSL shader compiled binary(OpenGL ES2.0 not support)" , KCVar .FLAG_LAUNCHER ,
465+ "1" , "Disable" ,
466+ "2" , "Enable(check source)" ,
467+ "3" , "Enable(not check source)"
468+ ),
469+ KCVar .CreateCVar ("harm_r_openglVersion" , "string" , "GLES3.0" , "OpenGL version" , KCVar .FLAG_INIT | KCVar .FLAG_LAUNCHER ,
470+ "GLES2" , "OpenGL ES2.0" ,
471+ "GLES3.0" , "OpenGL 3.0+"
472+ )
473+ );
474+
390475 _cvars .put ("RENDERER" , RENDERER_CVARS );
391476 _cvars .put ("FRAMEWORK" , FRAMEWORK_CVARS );
392477 _cvars .put ("base" , GAME_CVARS );
@@ -402,6 +487,7 @@ public static Map<String, KCVar.Group> CVars()
402487 _cvars .put ("Xash3D" , XASH3D_CVARS );
403488 _cvars .put ("Source" , SOURCE_CVARS );
404489 _cvars .put ("SkinDeep" , SKINDEEP_CVARS );
490+ _cvars .put ("QC" , QC_CVARS );
405491
406492 return _cvars ;
407493 }
@@ -439,6 +525,8 @@ else if(Q3E.q3ei.isSource)
439525 res .add (_cvars .get ("Source" ));
440526 else if (Q3E .q3ei .isSkinDeep )
441527 res .add (_cvars .get ("SkinDeep" ));
528+ else if (Q3E .q3ei .isQC )
529+ res .add (_cvars .get ("QC" ));
442530 else if (Q3E .q3ei .isD3 )
443531 {
444532 res .add (_cvars .get ("RENDERER" ));
0 commit comments