- from OpenGL Programming Guide: The Official Guide to Learning OpenGL, Version 4.3, Eighth Edition
- Publisher: Addison-Wesley Professional
- Released: March 2013
A point might rasterize to multiple fragments. gl_PointCoord gives a normalized coordinate (ie. x,y \in [0,1]) of the fragment that indicates which part of the point the fragment occupies. Since in normalized coordinates, can easily use that coordinate for texture mapping without modification (when a texture is used like this, for mapping into points, it is called a sprite).
Point sprites essentially give texture mapping functionality to points (as opposed to lines or convex polygons), even though they are not typically thought of as having an area. They are an optimization over accomplishing the same function with, say, a quad whose rasterization will be more computationally intensive.
Share this highlighthttp://www.safaribooksonline.com/a/opengl-programming-guide/5342/