Using the definitions of terms described in the preceding paragraphs, the following represents the entire lighting calculation in RGBA mode.