PDA

View Full Version : How can I escape from blur effect?



anubis79
16-10-2003, 04:29 PM
When I zoom in an image using Blt function I get a blur effect. It looks like bilinear filtering. Can someone explain why this done and how can I escape from this blur effect ?

Paulius
18-10-2003, 04:20 PM
It happens on most video cards, but I have no idea why. The only way I found around this is to keep the surface which I want stretched in system memory.

anubis79
18-10-2003, 05:53 PM
I use DelphiX and Delphi6. What do you use Pailius?

Additionally, I've tried it to put system memory but performance's fallen. Also I need to scrooll stretched image(texture) on the screen (like Commandos 2 and lots of RTS game' s zoom scroolling). I use NVidia TNT2 M64 32MB video card. Do you think problem will end if I change or upgrade it? Please, open dxdiag and disable 2D hardware accaleration then compile one of your simple stretch project, you can see zoom effect is clear. I think it depens on some accaleration features and there should be a way to prevent it using directdraw properties.

Paulius
18-10-2003, 06:49 PM
I don't use any components to avoid VCL and besides, after some wrapping there are only a few useful functions in DirectDraw.
When you disable DirectDraw acceleration video memory becomes unavailable so DelphiX must create all surfaces in system memory, thats why there's no blurring.
I?_Tm not too sure what you meant by zoom scrolling, could you explain in with more detail?
Upgrading you?_Tre video card won?_Tt help, in fact all nVidia card?_Ts I?_Tve tried, not depending on their age, do this blurring, although I?_Tm not sure about ATI cards.

anubis79
18-10-2003, 10:35 PM
Zoom scrolling : I' d like to display my stretched image like a background
scrooling on the screen. Big or small texture than the default texture, displaying and scrooling on the screen. I know term wasn't distinct. Is it clear now? Can you suggest me a different way to make it?

Paulius
19-10-2003, 08:26 AM
Underneath all the ugliness practically the only thing, if you don?_~t count clipping, color keying, etc., that DirectDraw does is blitting, so there?_Ts really no other way.

anubis79
19-10-2003, 10:05 AM
Good, Do you think Direct3D can be used for zooming? I thought z-axis may be used for this action. Do you agree? Is it possible?

Harry Hunt
19-10-2003, 05:36 PM
Use Direct3D (IDirect3DSprites) and turn off filtering...