Browse Prior Art Database

Enhancement to Floating Point Integer Power Hardware for Phong Lighting Model

IP.com Disclosure Number: IPCOM000105285D
Original Publication Date: 1993-Jul-01
Included in the Prior Art Database: 2005-Mar-19
Document File: 4 page(s) / 102K

Publishing Venue

IBM

Related People

Karim, F: AUTHOR [+3]

Abstract

Specular highlight component for Phong lighting model is evaluated in graphics by computing the dot product of two vectors and raising the result to an integer power. The dot product is a floating point number in the range of +/- 1.0. The integer power is called material's specular reflection coefficient or shininess of the material and ranges from 0 to 127. A graphics floating point processor's hardware can compute the floating point integer power by square-forwarding method. The format and the description of the floating point instruction to evaluate this function in graphics as follows:

This text was extracted from an ASCII text file.
This is the abbreviated version, containing approximately 52% of the total text.

Enhancement to Floating Point Integer Power Hardware for Phong Lighting Model

      Specular highlight component for Phong lighting model is
evaluated in graphics by computing the dot product of two vectors and
raising the result to an integer power.  The dot product is a
floating point number in the range of  1.0.  The integer power is
called material's specular reflection coefficient or shininess of the
material and ranges from 0 to 127.  A graphics floating point
processor's hardware can compute the floating point integer power by
square-forwarding method.  The format and the description of the
floating point instruction to evaluate this function in graphics as
follows:

   fipoz FRT, FRA, FRB      # (FRT) <-- (FRA)**(FRB)  if FRA > 0
                            # (FRT) <-- 0 otherwise.

Only least significant eight bits of (FRB) are used to get the
integer power, as it is usually in the range of 0 to 127.  This
instruction does not have a priori knowledge if the computed result
could be insignifi- cant for the given precision and hence computes
the power always.  An enhanced version of the hardware has a
conditional component that will take the significance factor into
consideration and avoids unnecessary power computation.  It is based
on the principle illustrated in the Figure and is described below.

      Every object has a constant specular reflection coefficient
based on its material.  For example, Head GPC benchmark has a
specular reflec- tion coefficient of 15, Space Shuttle GPC benchmark
has a coefficient of 128 and so on.  The color components R, G, and B
have a range of values from 0 to 255 for 24-bit color adapters.  The
computation of specular highlighting follows the sphere pattern
illustrated in the Figure.  Dot product computation for any vertex
lying on the same circle produces identical result.  The result of
the dot product is 1.0 at the closest point to the viewer and reduces
to zero while going away from that point on the surface.  The result
of the dot product is negative for the part hidden from the viewer.

      A minimum value for the power computation can be found below
which any value raised to the power of specular reflection
coefficient will yield a result that is insignificant for a given
precision.  As there are 256 levels in each color component in our
case, each level corresponds to a value of 1/256.  Considering a 1/2
LSB tolerance for rounding errors etc., yields a significant minimum
color component value of 1/512.  The dot product values corresponding
to 1/256 and 1/512 are s...