hand-written version of lighting benchmark