cnc-ddraw
cnc-ddraw copied to clipboard
Better Quality for GDI fallback?
Hi there,
I got a question, if it's worth and possible to use GDI+? Cause as far as i know it enables things similar to Anti-Aliasing and Alphablending. It's just a question from someone who isn't so much into graphic programming. It's useable for WinXP too.
Software renderer is too slow for real-time processing with good looking algorithms, even bilinear is not doing too well. There is a hidden setting "gdilinear=true" which you can try but you need a good CPU for it.
For older hardware that doesn't support opengl 3.0 you can still use Direct3D 9. Latest build (4.4.3.1) also has a bilinear shader now for Direct3D 9, I might add 1-2 more shaders for Direct3D 9 soon too.
Is he using windows xp? What graphics card? Btw, the Direct3D 9 renderer should work fine on hardware that supports pixel shader 2.0 (release date was 2002), if it doesn't work for him then let me know, maybe it can be fixed.
Ah, nah it was a personal question. Im using your DLL for many games and most of them are running fine with OpenGL (and i like the upscale shaders there). But for example when i play Anno 1062 with your DLL, it looks good but the GDI is needed like in the preset, so i was thinking if there is a way for some better upscaling quality. Will try "gdilinear=true" and see if my PC can do it (got a i7-3770, i think it should be fine)
EDIT: Okay...it's really lagging with it. Didn't expect it...hmm okay. GDI is supposed for fallback anyway, so it's fine. Thx for the answer.
Ah, yeah... anno got some weird bug in the main menu, I still need to figure out what's going on there.
Meanwhile you can do the following trick: savesettings=0 width=0 height=0 windowed=true fullscreen=false renderer=opengl hook=4
This should start the game in a window, now you just have to click on the maximize button. Not as good as borderless mode, but at least you get shader upscaling working
Oh okay, yeah it works and looks nice. Though, that it just didn't work. Perhaps i should test more myself heh. Thx and sorry if it was a stupid question perhaps. Im a Programmer myself, so im interested in such things. Hope you can improve the DLL more.
Nice! It works! Man, for real, i really really like your DLL work. I can play Anno 1602 with my friends again on Win8+ ! Another thing i noticed with GDI Lilinear is, that when i set "singlecpu=false" it is working (atleast with Anno 1602 on the performance thing) but i get the vertical "desync" (same thing as when i disable VSync with Directx/OpenGL games) . Is there a way to emulate VSync with GDI when "vsync=true" ?
That's a good idea with singlecpu=false! I think I have to enable that by default when gdilinear is enabled.
I will try to add a custom linear upscaler, currently just using "SetStretchBltMode(hdc, HALFTONE);", that should solve the problem with the tearing and maybe it's even faster than what microsoft is doing there
Is there a way to emulate VSync with GDI when "vsync=true" ?
You can try that too, but what i meant is if you can emulate VSync with GDI, when GDI Lilinear is on (It happends with singlecore sometimes too but less, cause the Singe CPU is overloaded with the rendering work). In MultiCore you can see the tearing more, I'm not even sure if it is worth doing it then when the main render thread need to wait for the other render threads to finish for each frame. Could cause fps drops then.
Yeah it would slow down the main thread a lot then, so it's probably not worth it. But I would copy the content of the surface then first (which is fast) and then do the upscaling from the copied bitmap to avoid the tearing. Maybe I'll try the GDI+ solution you suggested
closing this as the Direct3D9 now having bilinear+bicubic filters that run even on 15+ years old hardware, the GDI renderer is almost never used so it isn't worth the effort