float luminance = dot(vec3(0.2125, 0.7154, 0.0721), rgbColor);

This luminance mapping function is the standard used in manufacturing contemporary monitors, and it defines a linear RGB color space. The coefficients 0.299, 0.587, and 0.114 are often used to convert an RGB value to a luminance value. However, these values were established with the inception of the NTSC standard in 1953 to compute luminance for the monitors of that time, and they are used to convert nonlinear RGB values to luminance values. They do not accurately calculate luminance for today's CRT monitors, but they are still appropriate for computing nonlinear video luma from nonlinear RGB input values as follows:

float luma = dot(vec3(0.299, 0.587, 0.114), rgbColor);