GL_SAMPLEPOSITION(3G)
πΈ NAME πΈ
okay so welcome to the GL_SAMPLEPOSITION(3G) page, bestie β manual section 3G, with that header placeholder [FIXME: manual] doing its little thing. π
gl_SamplePosition β contains the location of the current sample within the current fragment. slay.
π DECLARATION π
the declaration is literally this, no cap:
in vec2 gl_SamplePosition ;.SH "DESCRIPTION"
yes, the .SH "DESCRIPTION" bit is glued on there in the original source line β iconic formatting chaos, periodt. π
β¨ DESCRIPTION β¨
gl_SamplePosition is a fragment language input variable that contains the location within a fragment of the sample currently being processed.
The x and y components of gl_SamplePosition contain the sub-pixel coordinate of the current sample and will have values in the range 0.0 to 1.0. The sub-pixel coordinates of the center of the pixel are always (0.5, 0.5).
big caveat, bestie: any static use of gl_SamplePosition causes the entire fragment shader to be evaluated per-sample rather than per-fragment. πβ¨
When rendering to a non-multisample buffer, or if multisample rasterization is disabled, gl_SamplePosition will be (0.5, 0.5).
π¦ VERSION SUPPORT π¦
hereβs the support vibe check for the function name gl_SamplePosition across the OpenGL Shading Language Version columns, fr fr:
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_SampleID()gl_SampleMask()gl_FragCoord()
π COPYRIGHT π
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 π
Copyright Β© 2011-2014 Khronos Group
okay bestie, thatβs the whole GL_SAMPLEPOSITION(3G) page. the footer energy is source/version [FIXME: source], dated 08/09/2021 β mwah ππ«Ά
π¦ where this page comes from
- centos-stream 9: gl-manpages 1.1-24.20190306.el9 Β· MIT and Open Publication
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms