@@ -206,6 +206,14 @@ Cvar::Cvar<int> r_rendererAPI( "r_rendererAPI", "Renderer API: 0: OpenGL, 1: Vul
206206 " r_toneMappingDarkAreaPointLDR" , " Convert to this brightness at dark area cut-off" ,
207207 Cvar::NONE, 0 .268f , 0 .0f , 1 .0f );
208208
209+ Cvar::Cvar<bool > r_lowLightDithering (
210+ " r_lowLightDithering" , " Use dithering in low light areas" , Cvar::NONE, true );
211+ Cvar::Range<Cvar::Cvar<int >> r_lowLightDitheringThreshold (
212+ " r_lowLightDitheringThreshold" , " Color channel sRGB value under which low light is dithered" ,
213+ Cvar::NONE, 6 , 2 , 20 );
214+ Cvar::Cvar<bool > r_showLowLightDithering (
215+ " r_showLowLightDithering" , " Show dithering applied on low light areas" , Cvar::CHEAT, false );
216+
209217 cvar_t *r_lockpvs;
210218 cvar_t *r_noportals;
211219
@@ -1268,6 +1276,10 @@ ScreenshotCmd screenshotPNGRegistration("screenshotPNG", ssFormat_t::SSF_PNG, "p
12681276 Cvar::Latch ( r_highPrecisionRendering );
12691277 Cvar::Latch ( r_accurateSRGB );
12701278
1279+ Cvar::Latch ( r_lowLightDithering );
1280+ Cvar::Latch ( r_lowLightDitheringThreshold );
1281+ Cvar::Latch ( r_showLowLightDithering );
1282+
12711283 r_drawBuffer = Cvar_Get ( " r_drawBuffer" , " GL_BACK" , CVAR_CHEAT );
12721284 r_lockpvs = Cvar_Get ( " r_lockpvs" , " 0" , CVAR_CHEAT );
12731285 r_noportals = Cvar_Get ( " r_noportals" , " 0" , CVAR_CHEAT );
0 commit comments