Clipping (computer graphics)

Clipping, in the context of computer graphics, is a method to selectively enable or disable rendering operations within a defined region of interest.

A well-chosen clip[clarification needed] allows the renderer to save time and energy by skipping calculations related to pixels that the user cannot see.

In two-dimensional graphics, a clip region may be defined so that pixels are only drawn within the boundaries of a window or frame.

In many implementations, the final clip region is the composite (or intersection) of one or more application-defined shapes, as well as any system hardware constraints In one example application, consider an image editing program.

As the user zooms and scrolls to view a smaller portion of the image, the application can set a clip boundary so that pixels outside the viewport are not rendered.

[2] Application software can take advantage of this clip information to save computation time, energy, and memory, avoiding work related to pixels that aren't visible.

Many optimized clipping methods rely on specific hardware acceleration logic provided by a graphics processing unit (GPU).

[3] For example, a tall wall or building that occludes other game entities can save GPU time that would otherwise be spent transforming and texturing items in the rear areas of the scene; and a tightly integrated software program can use this same information to save CPU time by optimizing out game logic for objects that aren't seen by the player.

A view frustum, with near- and far- clip planes. Only the shaded volume is rendered.