Patent ID: 6081274
Filing Date: 2000-06-27
Classification: G06T

Abstract:
A shading processing device, comprising:light-source vector generating means for obtaining a normalized light-source vector of a point light source from light-source coordinates and polygon vertex coordinates;diffuse reflection processing means for obtaining a first inner product of the normalized light-source vector calculated by the light-source vector generating means and a polygon normal vector;specular reflection processing means for obtaining a light-source reflection vector from the normalized light-source vector and polygon normal vector, and obtaining a second inner product of the light-source reflection vector and a sight-line (eye) vector; andcolor information generating means for calculating polygon surface or polygon vertex color information, which has undergone shading processing, by multiplying said first inner product by diffuse reflection coefficients so as to obtain diffuse reflection light intensities and multiplying said second inner product by specular reflection coefficients so as to obtain specular reflection light intensities,wherein said light-source vector generating means comprises:means for obtaining a not-yet-normalized light-source vector from the light-source coordinates and the polygon vertex coordinates;bit-length reducing means for reducing the bit length of each value of the not-yet-normalized light-source vector; andnormalized means for normalizing the not-yet-normalized light-source vector using each value having the reduced bit length;wherein said bit-length reducing means comprises:means for counting the ""0"" values from the MSB in each value of the not-yet-normalized light-source vector and obtaining the minimum count value;means for shifting each value to the MSB side by an amount obtained from subtracting 1 from the minimum value; andmeans for using predetermined more significant bits from the shifted each value so that the bit length of each value of the not-yet normalized light-source vector is reduced.