VOGONS


dgVoodoo 2 for DirectX 11

Topic actions

  • This topic is locked. You cannot reply or edit posts.

Reply 1920 of 3949, by VEG

User metadata
Rank Newbie
Rank
Newbie

I have tested the latest dgVoodoo WIP with the NFS3 Modern Patch.

1. DX8 still doesn't read dgvoodoo.conf from the DLL's directory.
2. DX8 looks like on this video: https://drive.google.com/file/d/0BxsYG4LzThr4 … iew?usp=sharing
3. DX6 goes into a deadlock when I'm using native windowed mode (just after pressing the “Race” button).

How to reproduce:
1. Download http://veg.by/files/nfs3/nfs3_modern_patch_beta.7z and install it
2. Open nfs3.ini and set ThrashDriver=dgdx6, WindowedMode=1
3. Run the game, start gameplay

Also DX6 have problems with minimizing in the fullscreen mode. To test it change set ThrashDriver=dgdx6, WindowedMode=0.

This WindowedMode setting is still not finished and it still doesn't remove border of the main window when gameplay resolution is equal to the system resolution. Currently I'm using this mode for debugging when DX renderer is used, but I'm planning to improve this feature in the future. Also it works only for the DX renderers.

Best regards, Evgeny

Reply 1921 of 3949, by Dege

User metadata
Rank l33t
Rank
l33t
De-M-oN wrote:
Maybe the 16bit depth buffer was the problem. I thought it was needed to avoid the z-texture fighting with headlights on nightra […]
Show full quote

Maybe the 16bit depth buffer was the problem. I thought it was needed to avoid the z-texture fighting with headlights on nightraces, but apparently not. A very quick look into a lost canyon nightrace with weather had surprisingly still not the problem confused.png

I really wonder, because you mentioned in readme that it is exactly for doing that job. But you said it for NFS 3 though. But I assumed it is for NFS 4 the same due to same engine.
The 16bit depth buffer introduced other artefacts on NFS 4 though - like texture fighting on traffic signs and some cliffs look through the street.

But without the option it seems to work now and also the fps stayed this time on 60.

edit: The obversation was too short.

A race on lost canyon with 7 opponents (full field), this time on day, not night, and weather enabled, the water spray of the tires of the opponents still caused fps dropping down to 30 🙁

I use 2560x1600 as resolution and 8x MSAA. But without MSAA the situation doesnt get better. And reducing the resolution is no option for me and other glide wrapper manage to handle the fps. But for some reason nGlide gives me at NFS 4 now a AMF error and zeckensack has good fps too, but it has this headlight z-texture fighting problem on the nightraces.

My hope is your wrapper 😀

edit 2: I'm this time totally confused, because I tried again MSAA at off and now full 60fps all the way.

I dont get it. I swear it didnt helped last time. I could only imagine that I had AA in graphics driver enabled for accident.

But I'm also curios that it takes so much performance on a GTX 680 using MSAA 8x on NFS 4.

I could imagine that it is because it anti aliases every single particle of the water spray? 😁

Because its interesting that the fps only drops if you're close to this waterspray, or other effects like this.

I don't know why watersprays are so special to the problem 😀, but it all sounds as if you were driving Glide with its precompiled shaders.
But assuming you don't have the D3DCompiler installed (with other modern stuffs like games and such) is weird.

Reply 1924 of 3949, by RaymanForever2007

User metadata
Rank Newbie
Rank
Newbie
Dege wrote:
RaymanForever2007 wrote:

Thank you for replying that you will keep "Arabian Nights" in your mind.
I hope dgVoodoo will work on "Arabian Night" for 3Dfx mode as well as now working in Direct3D mode.

Ok, I fixed the problem. Now it runs through Glide too.

Thank you Dege for fixing the 3Dfx issue on "Arabian Nights".
Could you tell me where can I download the latest dgVoodoo ?
Your website
http://dege.freeweb.hu/
still has only v2.51.

Reply 1925 of 3949, by x86++

User metadata
Rank Newbie
Rank
Newbie

Impressive work on dgvoodoo2 and hooking the early directx calls.

Is it also possible to hook GDI calls which route into the DIB engine? Many early directx games have a fallback option so that the DIB engine does the drawing to screen. This method seems faster is some cases and often provides a more compatible mode than the directdraw surfaces.

Where there is a fallback mode, often it is accessible in a window only. Is it also possible to hook the window and instead make it appear fullscreen? An example is Unreal.

Reply 1927 of 3949, by De-M-oN

User metadata
Rank Newbie
Rank
Newbie

Ahhh now I noticed what you mean bei D3DCompiler_43.
Its something on your website. Okay - interesting - but no so far we didnt had that in use.

But has that even relevance on Glide?
But anyway - we didnt use it.

edit: My system already has that file in syswow64 along with older ones.

Reply 1928 of 3949, by Dege

User metadata
Rank l33t
Rank
l33t
VEG wrote:

It'd be better not to add support for D3D8 through dgvoodoo, for the time being.
The game rendering method is pretty straitforward and can't see any bugs on either (game and my) side.
I have no clue at all at the moment why it is. As I said earlier, it seems to be impossible to debug. 🙁

RaymanForever2007 wrote:

Thank you Dege for fixing the 3Dfx issue on "Arabian Nights".
Could you tell me where can I download the latest dgVoodoo ?

I didn't released it yet. I want to accomplish some things first, and then I can release a new WIP here.
And after that, a new "official" version would be fine too.

x86++ wrote:

Impressive work on dgvoodoo2 and hooking the early directx calls.

Is it also possible to hook GDI calls which route into the DIB engine? Many early directx games have a fallback option so that the DIB engine does the drawing to screen. This method seems faster is some cases and often provides a more compatible mode than the directdraw surfaces.

Where there is a fallback mode, often it is accessible in a window only. Is it also possible to hook the window and instead make it appear fullscreen? An example is Unreal.

Thanks! Though dgVoodo is not about hooking and modifying the DirectX calls but replacing them completely.
On the other hand, hooking would be possible for game windows too, one just need to write a new User32.dll or sg to catch calls for a given window.
But, I guess a simple external tool (application) would be enough for most of these type of games which can force the window into maximized state (+allowing setting window styles to remove border).

De-M-oN wrote:

But has that even relevance on Glide?
But anyway - we didnt use it.

Yes, it has because dgVoodoo's Glide uses that for compiling the generated shaders. It's always more optimal, as for the rendering performance, than simply using the precompiled ones.
What about DX7 output? It'd be fine to know if it's something in Glide/DX wrapping that shares a common origin , or just Glide.

Reply 1929 of 3949, by UCyborg

User metadata
Rank Member
Rank
Member

Just a quick question. I tried dgVoodoo 2 on Drakan. an old DirectX 6.1 game. It resulted in about 2x faster rendering performance. It also negates the need for having to disable so called maximized windowed mode to make it fullscreen properly and tabbing out of the game while in fullscreen mode is as fast as it should be. It's otherwise slow since Windows 8.

There is just one hitch. Mouse feels noticeably less smooth and responsive. I usually run the game with VSync enabled, my monitor refresh rate is 60 Hz and I've capped the game frame-rate to 58 FPS to improve mouse responsiveness (game must run at around 60 FPS otherwise glitches arise). So I tried running with uncapped frame-rate and without Vsync and compared how it feels with and without dgVoodoo and the result is similar. Like if you put the artificial brake on the mouse. Any idea why is that so?

Arthur Schopenhauer wrote:

A man can be himself only so long as he is alone; and if he does not love solitude, he will not love freedom; for it is only when he is alone that he is really free.

Reply 1931 of 3949, by UCyborg

User metadata
Rank Member
Rank
Member

Oh and just a comment about games using Direct3D 8. While, from my limited experience, there aren't any significant problems with them, except this, I know for certain there is a problem with games that render shadows, decals, etc. by setting Z-bias value before rendering certain coplanar polygons (or something like that), calling IDirect3DDevice8::SetRenderState with D3DRS_ZBIAS and some value from 0-16 for parameters.

Mafia is an example of such game and from my messing around with it using the debugger, I figured it probably uses value of 8 when rendering shadows, decals, ..., but on ATI cards, it uses value of 2. Fom what I've read online, this Z-bias thingy never worked right. It behaves differently across different cards, different driver versions, ... Even if you set Z-bias to maximum value, there are still Z-fighting problems in the game. Interestingly, I observed no Z-fighting issues running it on Linux via Wine, at least on NVIDIA without hacking the game executables. So their OpenGL implementation gives correct results in that case.

Arthur Schopenhauer wrote:

A man can be himself only so long as he is alone; and if he does not love solitude, he will not love freedom; for it is only when he is alone that he is really free.

Reply 1932 of 3949, by UCyborg

User metadata
Rank Member
Rank
Member
De-M-oN wrote:

You reached a wrapping without vsync? I never got it working. Every game which goes through dgvoodoo is for some reason vsynched on my end.

Really? Yeah, judging from in-game FPS display, it works correctly, but mouse certainly feels like if you have Vsync, but not quite the same as it does without dgVoodoo. I'll try forcing it off via NVIDIA Profile Inspector and see if that does anything, but the thing is, VSync + framerate cap to 58 doesn't feel the same as VSync + framerate cap to 58 + dgVoodoo. And it feels different even without framerate capping and vsyncing.

Other than that, quite fantastic piece of software. Today, I've also learnt that DirectX versions 7 and below have artificial limit when it comes to game resolution. It doesn't allow any resolution with width or height exceeding 2048 pixels. Can supposedly be patched, but still.

Edit: nothing wrong with Vsync on my end, game setting is respected and I can override it in driver settings if necessary. It's just that wrapping has effect on mouse input for some reason. This game uses the old DirectInput, which I've read isn't recommended to be used by Microsoft and supposedly is just a wrapper that creates new thread and queries Raw Input API to read the mouse. But I guess it was the most convenient thing to use back in the 90s to support joysticks. If this has anything to do with it...

Arthur Schopenhauer wrote:

A man can be himself only so long as he is alone; and if he does not love solitude, he will not love freedom; for it is only when he is alone that he is really free.

Reply 1933 of 3949, by De-M-oN

User metadata
Rank Newbie
Rank
Newbie

I've also learnt that DirectX versions 7 and below have artificial limit when it comes to game resolution. It doesn't allow any resolution with width or height exceeding 2048 pixels. Can supposedly be patched, but still.

DirectX 6 is even limited to 1280x1024, because Blood 2 crashes if you go higher than that. The wrapper fixes it of course.

But Blood 2 and NFS 4 and NFS 2 SE run all with 60fps and vsync.

But NFS 2 never forced vsync, NFS 4 was only framelimited to 64 fps at original engine ( and only ingame - the Pause menu works uncapped), and Blood 2 is capped too, but I dont know what behaviour it has without being wrapped.

But the NFS Games are all vsynched when used with dgvoodoo.

I have to use vsync anyway as soon as I want to capture them with my capture card (which is 99% the case) to avoid captured videos with tearing, but without capturing I would highly prefer playing without vsync.

Reply 1934 of 3949, by Peixoto

User metadata
Rank Member
Rank
Member
UCyborg wrote:
De-M-oN wrote:

You reached a wrapping without vsync? I never got it working. Every game which goes through dgvoodoo is for some reason vsynched on my end.

Other than that, quite fantastic piece of software. Today, I've also learnt that DirectX versions 7 and below have artificial limit when it comes to game resolution. It doesn't allow any resolution with width or height exceeding 2048 pixels. Can supposedly be patched, but still.

This is not true. That limitation only applies to a surface that is at the same time a texture and a render target, but a surface that is either one or the other can be as big as the driver supports

Reply 1935 of 3949, by Glurak

User metadata
Rank Newbie
Rank
Newbie
Dege wrote:

Till then, what about D3D? Diablo II worked with it for me, but I'm not sure if there is something special in Glide as for the rendering quality.

Glide has more Graphic Effects than D3D (Spells looks better, More Shiny More Performance and some more Level of Detail)

In Act 3 As Example you can the the Staff in a Bubble only with Glide.

Reply 1936 of 3949, by RaymanForever2007

User metadata
Rank Newbie
Rank
Newbie
Dege wrote:
RaymanForever2007 wrote:

Thank you Dege for fixing the 3Dfx issue on "Arabian Nights".
Could you tell me where can I download the latest dgVoodoo ?

I didn't released it yet. I want to accomplish some things first, and then I can release a new WIP here.
And after that, a new "official" version would be fine too.

I got you. I am looking forward to your fix work to be a awesome one as used to be.

Reply 1937 of 3949, by Dege

User metadata
Rank l33t
Rank
l33t
UCyborg wrote:

Oh and just a comment about games using Direct3D 8. While, from my limited experience, there aren't any significant problems with them, except this, I know for certain there is a problem with games that render shadows, decals, etc. by setting Z-bias value before rendering certain coplanar polygons (or something like that), calling IDirect3DDevice8::SetRenderState with D3DRS_ZBIAS and some value from 0-16 for parameters.

Mafia is an example of such game and from my messing around with it using the debugger, I figured it probably uses value of 8 when rendering shadows, decals, ..., but on ATI cards, it uses value of 2. Fom what I've read online, this Z-bias thingy never worked right. It behaves differently across different cards, different driver versions, ... Even if you set Z-bias to maximum value, there are still Z-fighting problems in the game. Interestingly, I observed no Z-fighting issues running it on Linux via Wine, at least on NVIDIA without hacking the game executables. So their OpenGL implementation gives correct results in that case.

Yes, it's a nightmare, as values 0-16 are only indicates "probability" for z-offsets, instead of exact integer values added.
That's why it was changed to a normalized offset in the range of [-1..1] in DX9, but that's also an insane abstraction, in my opinion (the exact offset depends on the z-buffer bit depth). Luckily, z-biases are integer values in DX10 and up, as they always should have been.
Since it's up to the driver in DX8 (and earlier) to handle bias values, I set the factors by experimenting with (adjusting to) a nowadays driver, which may not be perfect (I should test Mafia too). Too big values are not good too, because while that eliminates z-fights, also can cause other z-artifacts somewhere else.

UCyborg wrote:

There is just one hitch. Mouse feels noticeably less smooth and responsive. I usually run the game with VSync enabled, my monitor refresh rate is 60 Hz and I've capped the game frame-rate to 58 FPS to improve mouse responsiveness (game must run at around 60 FPS otherwise glitches arise). So I tried running with uncapped frame-rate and without Vsync and compared how it feels with and without dgVoodoo and the result is similar. Like if you put the artificial brake on the mouse. Any idea why is that so?

You're using 'Stretched with ascpect ratio' for output scaling? Because in that case, the mouse cursor cannot be the hardware one but only a software emulated/drawn one which is unfortunately not always (feels) so smooth as the real one, even if a game runs at 60 fps. Sometimes I myself experience that.

Glurak wrote:

Glide has more Graphic Effects than D3D (Spells looks better, More Shiny More Performance and some more Level of Detail)

In Act 3 As Example you can the the Staff in a Bubble only with Glide.

Then hopefully Blizzard fixes the function names in their next patch.

Reply 1938 of 3949, by teleguy

User metadata
Rank Member
Rank
Member
De-M-oN wrote:

I've also learnt that DirectX versions 7 and below have artificial limit when it comes to game resolution. It doesn't allow any resolution with width or height exceeding 2048 pixels. Can supposedly be patched, but still.

DirectX 6 is even limited to 1280x1024, because Blood 2 crashes if you go higher than that. The wrapper fixes it of course.

DirectX 6 isn't limited to 1280x1024.

This is 3Dmark99 at 1920x1080.

download/file.php?mode=view&id=24241

Blood 2 crashes even with dgVoodoo unless you use Dege's patch.
http://dege.freeweb.hu/Patches.html
.
.
.

Attachments

  • 3dmark99.jpg
    Filename
    3dmark99.jpg
    File size
    1.17 MiB
    Views
    2152 views
    File license
    Fair use/fair dealing exception

Reply 1939 of 3949, by UCyborg

User metadata
Rank Member
Rank
Member
Peixoto wrote:

This is not true. That limitation only applies to a surface that is at the same time a texture and a render target, but a surface that is either one or the other can be as big as the driver supports

Oh, thank you for explanation. I just read somewhere else that the problem is resolution, there haven't been any other details. I guess the way it really is does make more sense, because why would the API that enumerates available resolutions report those that don't work.

Dege wrote:

You're using 'Stretched with aspect ratio' for output scaling? Because in that case, the mouse cursor cannot be the hardware one but only a software emulated/drawn one which is unfortunately not always (feels) so smooth as the real one, even if a game runs at 60 fps. Sometimes I myself experience that.

Nope, everything set to default except the watermark setting. It isn't necessary anyway since the game can be set to run at native resolution. It's not the end of the world though, but I'm pretty sure if you needed to run some twitch Quake-like shooter through dgVoodoo, I bet serious players would complain.

OK, I just tested Drakan with dgVoodoo on completely different machine and the results were the opposite, mouse was smoother through dgVoodoo than without. So it must be the hardware, drivers, maybe some other system settings etc. On desktop, I have AMD Phenom II X4 920 2,8 GHz and NVIDIA GeForce GTX 750 Ti, this is where mouse is less smooth with dgVoodoo. Laptop has AMD E1 6010 1,35 GHz APU with Radeon R2, where mouse was smoother with dgVoodoo. Either way, it's not some obscure bug in dgVoodoo.

Arthur Schopenhauer wrote:

A man can be himself only so long as he is alone; and if he does not love solitude, he will not love freedom; for it is only when he is alone that he is really free.