I am currently trying out the stencil shadow code from example L12. I successfully got the code running in my application (really easy to use) but I must have missed something. Here is a screenshot:

The problem: small flickering pixels in the shadow. If I place the camera near the shadow, the light pixels vanish, but if I get farther away, the flickering gets stronger and stronger.
Besides of this, I had to set the parameter clearStencilBuffer to true when calling DrawStencilShadow(). The example is somehow running without setting this. How does it come?