# Is gl\_FragData supported on any SGXs

**URL:** <https://forums.imgtec.com/t/is-gl-fragdata-supported-on-any-sgxs/1350>\
**Category:** PowerVR Insider\
**Created:** [March 28, 2012, 2:39pm UTC](https://forums.imgtec.com/t/is-gl-fragdata-supported-on-any-sgxs/1350 "2012-03-28T14:39:34Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![doctor\_fransk](https://avatars.discourse-cdn.com/v4/letter/d/e0b2c6/32.png) [@doctor\_fransk](https://forums.imgtec.com/u/doctor_fransk)\
**Post date:** [March 28, 2012, 2:39pm UTC](https://forums.imgtec.com/t/is-gl-fragdata-supported-on-any-sgxs/1350/1 "2012-03-28T14:39:34Z")

</div>

I saw Gordon's reply to this post: [https://www.imgtec.com/forum/forum\_posts.asp?TID=449&KW=gl%5FFragData&PID=2466#2466](https://www.imgtec.com/forum/forum_posts.asp?TID=449&KW=gl%5FFragData&PID=2466#2466), (that the stencil buffer cannot be used for arbitrary values) but it's not clear if the stencil buffer can be used straight-up from a fragment shader via gl\_FragData (to read/write reference values that you'd otherwise send through glStencilFunc).&nbsp;Anyone know?
&nbsp;

&nbsp;

---

<div class="post-metadata">

**Author:** ![marco](https://sea1.discourse-cdn.com/flex015/user_avatar/forums.imgtec.com/marco/32/96_2.png) [@marco](https://forums.imgtec.com/u/marco)\
**Post date:** [March 28, 2012, 2:50pm UTC](https://forums.imgtec.com/t/is-gl-fragdata-supported-on-any-sgxs/1350/2 "2012-03-28T14:50:52Z")

</div>

Hi doctor\_fransk,  
  
there is no facility in OGLES2 to read or write stencil values in the fragment shader.  
  
Regards,  
Marco
