Your company here — click to reach over 10,000 unique daily visitors

gl_PointCoord.3G - Man Page

contains the coordinate of a fragment within a point


in vec2 gl_PointCoord ;.SH "DESCRIPTION"

gl_PointCoord is a fragment language input variable that contains the two-dimensional coordinates indicating where within a point primitive the current fragment is located. If the current primitive is not a point, then values read from gl_PointCoord are undefined.

gl_PointCoord.s ranges from 0.0 to 1.0 across the point horizontally from left to right. If GL_POINT_SPRITE_COORD_ORIGIN is GL_LOWER_LEFT, gl_PointCoord.t varies from 0.0 to 1.0 vertically from bottom to top. Otherwise, if GL_POINT_SPRITE_COORD_ORIGIN is GL_UPPER_LEFT then gl_PointCoord.t varies from 0.0 to 1.0 vertically from top to bottom. The default value of GL_POINT_SPRITE_COORD_ORIGIN is GL_UPPER_LEFT.

Version Support

OpenGL Shading Language Version
Variable Name1.101.201.301.401.503.304.

See Also

gl_FragCoord(), gl_FragDepth()