摘要 |
An approach to optimize specular highlight generation is presented. A single microprocessor instruction is used to generate an intensity value based upon a viewing angle value. An application stores a viewing angle value in an input register. When called, the "intensity instruction" retrieves the viewing angle value from the input register, and calculates an intensity value using three distinct steps. In turn, the intensity instruction stores the intensity value in an output register for the application to retrieve and further process. In one embodiment, the invention may be implemented using PowerPC(TM) assembly and VMX(TM) or Altivec(TM) instructions. In this embodiment, the intensity instruction may be represented as a "vspecefp" instruction, which stands for a "vector specular estimate floating point" instruction.
|