# gl\_FragCoord - value for lower-left-most pixel is (0.5, 0.5) or (0, 0) ?

**URL:** <https://forums.imgtec.com/t/gl-fragcoord-value-for-lower-left-most-pixel-is-0-5-0-5-or-0-0/2286>\
**Category:** PowerVR Insider\
**Created:** [April 24, 2015, 2:31pm UTC](https://forums.imgtec.com/t/gl-fragcoord-value-for-lower-left-most-pixel-is-0-5-0-5-or-0-0/2286 "2015-04-24T14:31:10Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![hannesf99](https://avatars.discourse-cdn.com/v4/letter/h/87869e/32.png) [@hannesf99](https://forums.imgtec.com/u/hannesf99)\
**Post date:** [April 24, 2015, 2:31pm UTC](https://forums.imgtec.com/t/gl-fragcoord-value-for-lower-left-most-pixel-is-0-5-0-5-or-0-0/2286/1 "2015-04-24T14:31:10Z")

</div>

I am using OpenGL ES 2.0 on a PowerVR SGX544-MP2.

I would like whether the variable ‘gl\_FragCoord’ returns (0.5, 0.5) for the lower-left-most pixel in a window (like it is defined in OpenGL, see [https://www.opengl.org/sdk/docs/man/html/gl\_FragCoord.xhtml](https://www.opengl.org/sdk/docs/man/html/gl_FragCoord.xhtml)), or whether it returns (0.0, 0.0) ?

---

<div class="post-metadata">

**Author:** ![dark\_photon](https://sea1.discourse-cdn.com/flex015/user_avatar/forums.imgtec.com/dark_photon/32/224_2.png) [@dark\_photon](https://forums.imgtec.com/u/dark_photon)\
**Post date:** [April 24, 2015, 5:17pm UTC](https://forums.imgtec.com/t/gl-fragcoord-value-for-lower-left-most-pixel-is-0-5-0-5-or-0-0/2286/2 "2015-04-24T17:17:56Z")

</div>

OpenGL & OpenGL ES use 0,0 for the edge of the window/texture/etc. For gl\_FragCoord.xy, pixel edges are on integer values.

However, the location the fragment is launched for is somewhere within a pixel. If you’re using single-sample rasterization, the fragment locations will be at pixel centers (offset 0.5,0.5).

So your gl\_FragCoord.xy for the first row of pixels will probably be (0.5,0.5), (1.5,0.5), (2.5,0.5), etc.
