The only other thing I can think of is that the Bloom shaders are somehow disgarding the alpha values, thus leaving me with an opaque screen. Here's the shaders in case that's the case and I'm not seeing it:

I've tried everything possible that I could think of, so I'm looking for some advice. Chances are that anything you suggest, I won't know how to do, so brownie points for clear and concise descriptions so I can try to implement it quickly to determine if you were correct.

Do you think you can post a screenshot of what is happening right now and point out what should happen? I kind of think I understand what you are trying to say, but of course, a screenshot is worth a thousand words.
–
DManDec 28 '11 at 21:49

1 Answer
1

I've managed to get it working with a few minor changes to the sample. Here's the steps I took, but let me know if you need additional help.

On the BloomComponent Class

Add a new private RenderTarget2D instance to the BloomComponent class. I called it finalRenderTarget (Line 29).

Add a public getter FinalRenderTarget so that you can retrieve it from outside. (Line 35)

Initialize finalRenderTarget in the LoadContent() method, exactly like the existing sceneRenderTarget. (Line 106)

On the final device.SetRenderTarget() call in the DrawBloomedScreen() method, change null to finalRenderTarget so that the bloomed image is stored in the new render target instead of being rendered to the backbuffer. (Line 188)

At the very end of the DrawBloomedScreen() method add a device.SetRenderTarget(null) to pass control back to the backbuffer. (Line 206)

(Optional) Rename DrawBloomedScreen() to EndDraw(). I think it makes the code more symetric as you'll see below. :-) (Line 156)

I had run across SpriteFont before, but hadn't thought to use it. Since my UI (I should have called it a HUD) is mostly score, I wrote a fairly simple manual kerning class for it. It looks much better than anything I could have achieved with Bloom. However, I'll need your work later, so you have my thanks!
–
electroflameDec 29 '11 at 17:38

Thanks for this! I actually used a slightly modified version of your solution here to do two passes of bloom (one on part of the screen, one on the entire screen) at different settings, without requiring MRT.
–
Tristan CrockettMar 4 '12 at 22:10