GL_POINTCOORD(3G)

πŸ’– GL_POINTCOORD(3G) β€” gl_PointCoord is the main character now πŸ’–

okay so welcome to the GL_POINTCOORD(3G) manual page, bestie ✨ The header also has a lil [FIXME: manual] note, and we're folding the manual name in right here instead of copying the whole header line. It's giving "we read the source so you don't have to" πŸ’…

🌸 NAME 🌸

  • gl_PointCoord β€” contains the coordinate of a fragment within a point. literally that's the whole name section, short and iconic πŸŽ€

πŸŽ€ DECLARATION πŸŽ€

Here is the exact declaration line from the source, no edits, no cleanup:

in vec2 gl_PointCoord ;.SH "DESCRIPTION"
Yes, the .SH "DESCRIPTION" is glued onto the end in the original β€” it's the next section escaping its lane 😭. Keeping it because details are sacred, and we don't ghost the source.

✨ 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. periodt πŸ’™

If the current primitive is not a point, then values read from gl_PointCoord are undefined. Not me warning you to keep it to point primitives 🚨 no cap, undefined is undefined.

The way that gl_PointCoord.s ranges from 0.0 to 1.0 across the point horizontally from left to right? iconic behavior πŸ¦‹

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 πŸ“Š

The original table has columns for OpenGL Shading Language Version and a row for Variable Name. Flat-laying the tea: gl_PointCoord is checked in every version below, and each βœ” is exactly what the table says πŸ‘‘

  • 1.10 β€” βœ”
  • 1.20 β€” βœ”
  • 1.30 β€” βœ”
  • 1.40 β€” βœ”
  • 1.50 β€” βœ”
  • 3.30 β€” βœ”
  • 4.00 β€” βœ”
  • 4.10 β€” βœ”
  • 4.20 β€” βœ”
  • 4.30 β€” βœ”
  • 4.40 β€” βœ”
  • 4.50 β€” βœ”

πŸ‘€ SEE ALSO πŸ‘€

  • gl_FragCoord()
  • gl_FragDepth()

Copyright Β© 2011-2014 Khronos Group. This material may be distributed subject to the terms and conditions set forth in the Open Publication License, v 1.0, 8 June 1999. http://opencontent.org/openpub/.

Copyright Β© 2011-2014 Khronos Group.

xoxo, your Unix bestie πŸ’… β€” footer tea: source/version is [FIXME: source], date is 08/09/2021, and the manual is GL_POINTCOORD(3G). slay πŸ’‹

πŸ“¦ where this page comes from