Consider if a light is defined before defining the light equation

Little fix, the light equation is only needed on the shader, when a light has been defined on the scene.