Implement light tracing. Fix a bug with light material.