Question

I'm using DirectX9 for rendering video output onto the screen . The library used is SlimDX.

The software created is used for marking bad pixels from the output device so it's vital that no texture filtering / smoothing is done.

I disabled all the texture filtering options , disabled anti-aliasing , and aligned the texture to the screen at 1:1 ratio between the backbuffer and the rendered texture. Thing is , on some devices , DirectX seems to be doing some bilinear filtering / blurring on the output.

I need all the output to be blocky , with -0- filtering. Since all the resize code is operated on the control itself ( no backbuffer resizing etc' ) , I don't have the option of resizing the backbuffer.

Weird thing is , this only happens on some devices , not all.

How do I tell DirectX not to smooth what it renders to the control ? ( disable whatever texture filtering is done to the back/front buffer )

Thanks in advance for any help (:

For those who do not understand what I'm trying to get rid of - when the resolution of the rendered image is lower than the resolution of the area drawn to , Direct3D creates a smooth transition between pixels. What I want is for each pixel to be drawn as a simple rectangle , with absolutely no filtering , where can I find the settings that control this behavior?

Was it helpful?

Solution

I looked over it online , and it seems there is no proper explanation of this behavior anywhere .

What was going on :
The default DirectX behavior on WindowsXP and earlier was to smooth all rendering output ( if the control / screen you're rendering to isn't the exact same size as the backbuffer )

From WindowsVista onward the default behavior is to leave pixels as-is ( which basically means a stretched rectangle representing each pixel )

Since this is the behavior of the driver itself the user has absolutely no control over this : The only solution is to reset the backbuffer each time the control is resized to conserve per-pixel rendering , there is no way around it - otherwise DirectX has control over the resizing technique

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top