![]() ![]() Direct3D takes the original value and uses it to index a 256-element array (the ramp), where each element contains a value that replaces the original one. Each component is represented by a value from 0 to 65535. Here's how it works: Direct3D takes a pixel from the frame buffer and evaluates its individual red, green, and blue color components. The remapping is performed by way of three look-up tables, one for each color component. In Direct3D, the term gamma ramp describes a set of values that map the level of a particular color component - red, green, blue - for all pixels in the frame buffer to new levels that are received by the DAC for display. The SetGammaRamp and GetGammaRamp methods allow you to manipulate ramp levels that affect the red, green, and blue color components of pixels from the surface before they are sent to the digital-to-analog converter (DAC) for display. There is no waiting for a vertical sync operation. Because the gamma ramp is a property of the swap chain, the gamma ramp can be applied when the swap chain is windowed. ![]() There is always at least one swap chain (the implicit swap chain) for each device because Direct3D 9 has one swap chain as a property of the device. Or, you might adjust color levels to apply a color bias to the images in the back buffer. By setting gamma levels, you can cause the user's screen to flash colors - red when the user's character is shot, green when the character picks up a new item, and so on - without copying new images to the frame buffer to achieve the effect. Gamma controls make it possible to dynamically change how a surface's red, green, and blue levels map to the actual levels that the system displays. Gamma controls are a property of a swap chain. Think of these controls as very simple filters that Direct3D applies to data as it leaves a surface and before it is rendered on the screen. Gamma controls allow you to change how the system displays the contents of the surface, without affecting the contents of the surface itself. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |