The truth about texture mapping
暂无分享,去创建一个
The author describes how the unique configuration of the planet Uranus influenced him to take a close look at how the layout of a texture map in memory affects the performance of the rendering algorithm. A planet rendering program that calculates, for each occupied pixel on the screen, the latitude and longitude visible at that pixel, is described. It uses this latitude and longitude to index into a texture map to get a surface color. The actual texture color comes from bilinearly interpolating the texture colors at the four texture map pixels that surround that latitude and longitude. This, along with the shading calculations, gives the net color of the pixel. The use of virtual memory, handling page faults, tiling, and address generation are considered.<<ETX>>