Start with the code presented in the Rendering shadows with shadow maps recipe. There are three additional uniforms that need to be set. They are as follows:
- OffsetTexSize: This gives the width, height, and depth of the offset texture. Note that the depth is same as the number of samples per fragment divided by two.
- OffsetTex: This is a handle to the texture unit containing the offset texture.
- Radius: This is the blur radius in pixels divided by the size of the shadow map texture (assuming a square shadow map). This could be considered as the softness of the shadow.