diff --git a/src/r_main.c b/src/r_main.c
index 067b8abdbcf20d9918d582285b6efbe9374f453d..15afc434c7986041697b2c1f77ebcc706a6ac938 100644
--- a/src/r_main.c
+++ b/src/r_main.c
@@ -176,6 +176,17 @@ consvar_t cv_homremoval = CVAR_INIT ("homremoval", "No", CV_SAVE, homremoval_con
 
 consvar_t cv_renderstats = CVAR_INIT ("renderstats", "Off", 0, CV_OnOff, NULL);
 
+//
+// rr - map lighting
+//
+static CV_PossibleValue_t maplighting_angle_cons_t[] = {{0, "MIN"}, {360, "MAX"}, {0, NULL}};
+static CV_PossibleValue_t maplighting_contrast_cons_t[] = {{-FRACUNIT, "MIN"}, {FRACUNIT, "MAX"}, {0, NULL}};
+
+consvar_t cv_maplighting_toggle = CVAR_INIT ("maplighting_debug", "On", CV_SAVE, CV_OnOff, NULL);
+consvar_t cv_maplighting_angle = CVAR_INIT ("maplighting_angle", "135", CV_SAVE, maplighting_angle_cons_t, NULL);
+consvar_t cv_maplighting_contrast = CVAR_INIT ("maplighting_contrast", "64", CV_SAVE, maplighting_contrast_cons_t, NULL);
+consvar_t cv_maplighting_directional = CVAR_INIT ("maplighting_directional", "On", CV_SAVE, CV_OnOff, NULL);
+
 void SplitScreen_OnChange(void)
 {
 	if (!cv_debug && netgame)
@@ -1684,4 +1695,10 @@ void R_RegisterEngineStuff(void)
 
 	// Frame interpolation/uncapped
 	CV_RegisterVar(&cv_fpscap);
+	
+	// rr
+	CV_RegisterVar(&cv_maplighting_directional);
+	CV_RegisterVar(&cv_maplighting_contrast);
+	CV_RegisterVar(&cv_maplighting_angle);
+	CV_RegisterVar(&cv_maplighting_toggle);
 }