How can I make a black shadow/glow around my drawn rectangle made of primitives? Drop-shadowing is easy, but it's not exactly what I am looking for.


2 Answers 2


Render your primitives to a render target, and then use a pixel shader to blur and blacken the render target when you draw it back onto the screen. Then simply draw your render target without a pixel shader (or render your original primitives) to the backbuffer.

The Bloom Postprocess sample on App Hub should provide a sufficient example of how to render to a render target and then post-process it with a blur, to implement your effect.


Make two textures - foreground and background.
First draw your shapes in black color on first texture, and then blur this texture.
Next draw your shapes in normal color on second texture.
Draw first, then second.
Keywords: postprocessing, RenderTarget2D, gaussian blur


You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .