Managed to work out how fading works. How this will be integrated into the game remains to be planned. Now, fading and the light source can be tested. Just uncomment line 282.