# Variance Shadow map

**URL:** <https://forums.imgtec.com/t/variance-shadow-map/1340>\
**Category:** PowerVR Insider\
**Created:** [March 20, 2012, 11:24am UTC](https://forums.imgtec.com/t/variance-shadow-map/1340 "2012-03-20T11:24:13Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![aufgehaben](https://avatars.discourse-cdn.com/v4/letter/a/848f3c/32.png) [@aufgehaben](https://forums.imgtec.com/u/aufgehaben)\
**Post date:** [March 20, 2012, 11:24am UTC](https://forums.imgtec.com/t/variance-shadow-map/1340/1 "2012-03-20T11:24:13Z")

</div>

I’m trying to implement [variance shadow map](http://www.punkuser.net/vsm/) on an iphone 4 and 4s, but I have a hard time getting it to work. I first render a normal shadowmap, using a GL\_DEPTH\_COMPONENT16, set as the depthcomponent of an FBO. I then want to write the square of those values into another 16f texture, or write both the original and the square into a new texture, using a fullscreen pass. But I cant find a one or two-channel texture, with at least 16f precision, that I can bind to an FBO. Can anybody help me, either by giving my a texture format that does this, or a comprehensive list of texture formats, especially those that work with FBOs. Thanks.

---

<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 20, 2012, 11:38am UTC](https://forums.imgtec.com/t/variance-shadow-map/1340/2 "2012-03-20T11:38:43Z")

</div>

Hi aufgehaben,  
  
the extension GL\_EXT\_color\_buffer\_half\_float allows you to render to half float colour buffers and the RG16F\_EXT format seems like the one you are looking for.  
  
For a comprehensive list of formats I recommend having a look at the OpenGL ES specification here:  
[http://www.khronos.org/registry/gles/](http://www.khronos.org/registry/gles/)  
  
Regards,  
Marco

---

<div class="post-metadata">

**Author:** ![aufgehaben](https://avatars.discourse-cdn.com/v4/letter/a/848f3c/32.png) [@aufgehaben](https://forums.imgtec.com/u/aufgehaben)\
**Post date:** [March 20, 2012, 7:05pm UTC](https://forums.imgtec.com/t/variance-shadow-map/1340/3 "2012-03-20T19:05:45Z")

</div>

Thanks marco  
  
  
That seems to be the format I need, but I am unable to create it as a texture, only as a renderbuffer object. And I can’t find a way to resolve a renderbuffer object to a texture, without loosing the 16 bit float precision that I need. Is it apossible to create textures with one or two channel 16F format, or just renderbuffer objects?
