Imagination PowerVR SDK Blog

Variance Shadow map


#1

I’m trying to implement variance shadow map 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.


#2

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/

Regards,
Marco


#3

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?