dege-diosg / dgVoodoo2

Glide/DirectX implementation on D3D11/12
920 stars 40 forks source link

Half-Life 2 (Update): Crashes upon loading in DX9 mode and shadow options/color correction missing #91

Open RavenMacDaddy opened 3 years ago

RavenMacDaddy commented 3 years ago

Hello

So I was trying to wrap HL2 to use Auto HDR, but if I run the game with DX9 (the default which is v9.5 if I understand things correctly), it will throw up an error upon loading a game:

image

I also noticed I couldn't choose shadow details above Medium.

Reading up on that specifically, it seems like the game wraps the game to DX11 with the d3d9.dll, then gets confused and somehow expects DX8 to be used - hence the error above, and because DX8 mode for the game is limited to shadow details going up to Medium, as well as not having Color Correction (or motion blur).

Even more weird is that, if I actually force the game to use only DX8 by applying the launch option -dxlevel 81 or 80 (81 being the highest DX8 API available), it will still somehow make use of DX9 (DX9 is always the API presented by the RTSS OSD if dgVoodoo isn't being used), so if I don't provide the d3d9.dll, it won't wrap up to DX11 and d3d8.dll is never needed.

By the way, the game loads any DLLs from its bin dir, and providing additional DLLs like d3d8 from dgVoodoo doesn't make a difference since it's seemingly never used for anything.


To summarize:

dege-diosg commented 3 years ago

Yes, it always renders through d3d9.dll. DX8 level only means restricting to shader model 1.x and other GPU features that are available for a DX8-level GPU, but still through D3D9. It's like the feature levels in D3D11 and 12 (FL 10.0, 10.1, 11.0, etc).

I think the crash is because the amount of videomemory is set to the default 256MB. I tried it and it indeed crashed with that. Set it to higher, like 1024 or 2048. Btw, you can see such errors reported in the log with the _dbg version of dgVoodoo.

Shadow detail max is indeed Medium for some reason. It might worth digging into it some day to see why it is.

Other than that, everything seems to work as expected for me.

RavenMacDaddy commented 3 years ago

I think the crash is because the amount of videomemory is set to the default 256MB. I tried it and it indeed crashed with that. Set it to higher, like 1024 or 2048. Btw, you can see such errors reported in the log with the _dbg version of dgVoodoo.

Of course... that makes total sense.

Shadow detail max is indeed Medium for some reason. It might worth digging into it some day to see why it is.

That and color correction.

Motion blur falls under the same umbrella, but if that doesn't work, I'm honestly the last person who's gonna miss it.

Though I bet if you figure out the reason why, it will all fall into place.