I have an almost unmodified copy of the bloom sample in my project. I pass it a texture to apply the bloom post process on.
The only modification is that, instead of calling BeginDraw() (to set a render target) in the bloom sample and then doing all of my drawing, I simply do all of my drawing to a rendertarget outside of the bloom sample, and then pass that rendertarget to the bloom sample's Draw() method, which the bloom sample can then use to perform the bloom postprocess.
The texture that I pass to the bloom sample Draw() has format Color, according to the debugger (and by code inspection).
However, on the first draw call in the bloom sample, I get the following error:
The framework produces the error "XNA Framework HiDef profile requires TextureFilter to be Point when using texture format Single."
The code that produces this is as follows:
1 public void Draw(RenderTarget2D sceneRenderTarget) 2 { 3 GraphicsDevice gd = Game3.GDM.GraphicsDevice; 4 5 gd.SamplerStates[1] = SamplerState.LinearClamp; 6 7 //gd.SamplerStates[1] = SamplerState.PointClamp; 8 9 // Pass 1: draw the scene into rendertarget 1, using a 10 // shader that extracts only the brightest parts of the image. 11 _bloomExtractEffect.Parameters["BloomThreshold"].SetValue( 12 Settings.BloomThreshold); 13 14 DrawFullscreenQuad(sceneRenderTarget, _renderTarget1, 15 _bloomExtractEffect, 16 IntermediateBuffer.PreBloom); If I uncomment line 7 above, then the code runs without error (as point sampling will be enabled), but this should be unnecessary (and is not desired) as all rendertargets involved here are SurfaceFormat.Color -- which is not a floating point format!
Does anyone have any idea what might be going on? Perhaps someone has seen this before, and can give me a clue where to look next.
I have some experience with PIX, but I don't know how to use PIX to debug when the program crashes (basically I only know how to take single frame captures in PIX).