Patent ID: 7593021

Claim:
A method implemented by a shader program in a graphics processing environment for converting a plurality of RGB color components from a linear RGB color space to a non-linear sRGB color space the method comprising: receiving, at the shader program, a plurality of RGB color components in the linear color RGB space; selecting one or more of the RGB color components for individual conversion to non-linear sRGB data, wherein each of the RGB color components includes a sign, an exponent, and a mantissa; for each RGB color component selected, executing the steps of: processing the selected RGB color component to produce an sRGB color component represented in the nonlinear sRGB color space, by: generating an index to a look-up table based on a portion of the exponent of the selected RGB color component, based on the index, extracting from the look-up table a first color component represented in the non-linear sRGB color space, and clamping the first color component based on the sign and the portion of the exponent of the selected RGB color component to produce a second color component represented in the non-linear sRGB color space, and storing the second color component in a frame buffer memory.