The clip coordinate system is a homogeneous coordinate system in the graphics pipeline that is used for clipping. In OpenGL, clip coordinates are positioned in the pipeline just after view coordinates and just before normalized device coordinates (NDC).
Objects' coordinates are transformed via a projection transformation into clip coordinates, at which point it may be efficiently determined on an object-by-object basis which portions of the objects will be visible to the user. In the context of OpenGL or Vulkan, the result of executing vertex processing shaders is considered to be in clip coordinates. All coordinates may then be divided by the component, (the fourth component in homogeneous coordinates , see below) in what is called the perspective division. This transformation puts the objects into normalized device coordinates.
More concretely, a point in clip coordinates is represented with four components,
and the following equality defines the relationship between the normalized device coordinates , and and clip coordinates,
Clip coordinates are convenient for clipping algorithms as points can be checked if their coordinates are outside of the viewing volume. For example, a coordinate for a point is within the viewing volume if it satisfies the inequality . Polygons with vertices outside of the viewing volume may be clipped to fit within the volume.
|Wikibooks has a book on the topic of: Programming:OpenGL|
- Dave Shreiner; OpenGL Architecture Review Board (2006). OpenGL programming guide: the official guide to learning OpenGL, version 2. Addison-Wesley. ISBN 978-0-321-33573-9. Retrieved 29 December 2011.
- Segal, Mark; Akeley, Kurt (May 14, 2018). "OpenGL 4.6 Core Profile" (PDF). The Khronos Group.
- The Khronos® Vulkan Working Group (January 13, 2019). "Vulkan® 1.0.98 - A Specification". The Khronos Group. Retrieved January 23, 2019.
- "Vertex Post-Processing". The Khronos Group. Retrieved January 23, 2019.