DirectX bloom shader problems

I’ve got a bloom post-processor that doesn’t work on MonoGame.WindowsDX.
This is the famous bloom shader from the AlienScribble XNA tutorial, bundled up into a component. I’m having trouble debugging it because honestly the math is waaay over my head :wink:

It works fine on DesktopGL, Android, & iOS, but not WindowsDX…

Android:

WindowsDX:

I think there is something going on with this line, because that looks like a clamping problem, right?

GraphicsDevice.SamplerStates[1] = SamplerState.LinearClamp;

Cheers!

Hi dmanning23!

You are right. That looks like a clamping problem. But the line you mention just tells the textureSampler how to handle lookups outside its texture. I just re-wrote ye olde XNA Bloom Shader project myself ( https://github.com/UnterrainerInformatik/BloomEffectRenderer ) and maybe you can get something out of that project, since it’s tested on GL and DX, but it kind of lacks explanations and technical documentation, since it’s a production-library somehow. I use clamp as well most of the time in that code.

Personally I think that there’s a problem with your shaders. Could you post them? Maybe make a dump of the intermediate stages of your image to see at which stage that happens exactly.