A method and system for map based per-pixel specularity modulation of a
surface in a real time 3D graphics renderer through the use of
interpolated specularity function or environmental map values. One or
more functional modules calculate a pair of specular light intensity
values or color values. Each specularity value is representative of the
specular light reflected by the given pixel at an extreme surface
reflectance characteristic, i.e. one may represent reflection from a very
smooth surface while the other represents reflection from a very rough
surface. A specularity modulation, or dirt map, value is arrived at by
either a procedural calculation based on surface offset coordinates or by
retrieval from a two-dimensional map contained in a texture memory. The
specularity modulation value is then used as a weight to interpolate the
pair of specularity values. The resulting interpolated specularity value
is then optionally scaled by the modulation value (or a derivative
thereof) to produce a final specularity value. This final specularity
intensity or color value is then passed to a lighting unit that modulates
pixel color appropriately to include the given specular light.