What is a buffer template?

In computer graphic programming, the template template is a memory area that can be drawn and used in relation to other graphical leveling memory to achieve various effects or to camouflage the areas of the scene so that they are not processed or rendered. The template scheller is a per-pixel buffer similar to a black and white image in which each level in the buffer can hold a value that is most often 1 byte at most, but can only be 1 bit. The buffer was originally designed to act as a real or false mask, similar to the real world template, so the scene areas could be covered or ignored by setting the values ​​of different areas of the template to a value other than zero. There are a number of uses for a buffer beyond simple camouflage, including drawing a shadow bundle, implementation of HALOS around objects or localization areas where objects overlap each other. In many cases, the buffer is maintained in the graphic memory on the graphics card, sothat it can be quickly approached during rendering.

The concept of the template buffer was originally a way to create a two -dimensional (2D) mask that could be applied to a three -dimensional (3D) scene as the peaks walked through the graphics pipe. If the location of the 3D peak, once the rasterized, is related to the template area that was not set to zero, then this peak could be ignored and the rest of the pipe processing skipped. This allowed programmers a way to portray only a small part of the scene or portray the image into an irregularly shaped cut -out, such as a reflection in a small mirror in a larger scene where the shape of the mirror is drawn as a buffer template, and then the reflection is stretched through this shape. The

concerns about the memory led to the original form of the template buffer to be a grid of one -ite values ​​in which each pixel in the buffer could be true or false.As graphics cards evolve, most of the buffers were able to hold the full value of the bytes at each place of pixels, allowing programmers more difficult to be. This can allow the use of the buffer to detect areas where objects overlap, which can be done by increasing the level of buffer if the object occupies a pixel on the screen after rasterization. After this operation, the value of each pixel location in the buffer equals the number of objects that exceed the pixel on the screen.

One of the most popular uses for template template is to create shadows of volume. This can be done by rendering the scene with very muted lighting, so everything seems to be overshadowed. Furthermore, calculations are made to determine the location of all polygon surfaces in a scene that are illuminated by a light source, and these shapes are transferred to the template buffer. The scene is rendered again as if each object was fully illuminated and is mixed through shablo shapesNY on the shadow scene, effectively creating a picture that seems to contain objects with shadows.

IN OTHER LANGUAGES

Was this article helpful? Thanks for the feedback Thanks for the feedback

How can we help? How can we help?