摘要 |
<p>Rapid calculation of specular color component <MATH> for a displayed object subjected to light according to the Phong shading model is made preferably using hardware. For a surface position on the displayed object floating point data for D = &lang&Ve, Vr&rang& is obtained, where Ve is a unit vector from the object to the eye point, and Vr is a reflection unit vector from the object. The vector dot product for D is then obtained using multipliers and adders. The dot product bits are multiplied by a constant to generate an index to a first look-up table containing pre-stored values of log2 (D). The value of log2D is then multiplied by Oe to generate exponent and fractional field bits representing Oe*log2D. These bits are used to create an index into a second look-up table containing antilog2 values, whose output is <MATH> This value is then added to C'_s to yield <MATH> Calculation of Cs takes eight computer cycles, which is less what is required for prior art implemented Cs calculations. <IMAGE></p> |