Depth of field exception

Oct 5, 2011 at 3:25 AM

Hi,

I have tried the depth of field post processor and i have always the exception "XNA Framework HiDef profile requires TextureFilter to be Point when using texture format HdrBlendable" that was throwed on line 118 (FullFrameQuad.Render(this.GraphicsDeviceManager.GraphicsDevice, _viewport.Width, _viewport.Height);)

Do you have and idea why ?

Thanks in advance

Coordinator
Oct 5, 2011 at 9:02 AM

The DOF post processor isn't yet fully integrated. The issue you're mentionning is generally caused by the GraphicsDevice.SamplerStates not being reseted properly (this is a known Xna 4 bug).

This bug is set either if you modify texture samplers in a custom shader, one of the Xna 4 effects or using SpriteBatch.

I for instance got the issue with the GuiManager which wasn't reseting the SamplerStates once finished working with the Gui screens and controls. I couldn't see this before because it was the last thing rendering and SunBurn automatically resets SamplerStates on BeginFrameRendering. When I added the PostProcessManager to test DOF, I got the exact same issue.

Now, DOF isn't yet working, all I get is a black screen when using it. Still need to find out why. ;)

Oct 5, 2011 at 1:17 PM

Thank you for this answer.

Ok. If a try to reset the sampler states a have a black screen to.

I think that samplerstates should always be reseted to fix the xna 4 issue.

Coordinator
Oct 5, 2011 at 3:25 PM

I made a systemic reset in the GuiManager Draw() method (in the last changesets). But I'm not sure we should handle ourselves the samplerstate reset since it may be required in some specific cases that I'm unaware of.

As for the Black screen, that is the exact same result I have so far. I need to get deeper in the code to sort that out ;)