Page 1 of 2

Hook_D3d.dll Bug Report

Posted: Mon May 04, 2020 2:10 pm
by Darksaber
I've found a bug with Hook_D3d.dll

I tracked it down by first replacing DDraw.dll for older versions which didn't help as the problem persisted

I only went back as far as 1.1.3.6

I then removed each one of the hooks start with the newest dated, when it came to Hook_D3d.dll I removed it and the problem went away

I then went back to Ddraw.dll 1.1.3.10 again it was fine

I better show you the bug, and explain, while in the hangar I noticed while pressing the numberpad keys to look around that the shadows and transparency of the craft and objects kept disappearing, wait a few minutes and they would reappear then again disappear

Keypad 1
like so
flightscreen1a.jpg
.
then they appear and disappear sporadically
.
flightscreen2a.jpg
.
Keypad 3
.
flightscreen3a.jpg
.
You can see the workstand shadow has clearly gone, but look at the only craft they have no shadows, then the workstands shadow appears but the othe craft shadows are still missing
.
flightscreen4a.jpg
.
These are with the Hook_D3d.dll removed, this is how it should look with every transparency and shadows
.
flightscreen5a.jpg
.
flightscreen6a.jpg
.
So Jeremy could you possibly take a look at the Hook_D3d.dll please :)
Thank you

Re: Hook_D3d.dll Bug Report

Posted: Mon May 04, 2020 3:08 pm
by JeremyaFr
Thanks for the bug report.
I will take a look.

Re: Hook_D3d.dll Bug Report

Posted: Tue May 05, 2020 5:57 pm
by Darksaber
Or this! Bump!

Re: Hook_D3d.dll Bug Report

Posted: Tue May 05, 2020 6:57 pm
by JeremyaFr
I can't reproduce the problem. :(

Re: Hook_D3d.dll Bug Report

Posted: Tue May 05, 2020 8:07 pm
by Darksaber
I think you've have 4 releases of this hook and each one I get disappearing shadows and transparency's

Is this hook actually necessary?

Re: Hook_D3d.dll Bug Report

Posted: Tue May 05, 2020 8:16 pm
by JeremyaFr
The purpose of this hook is to improve performance of the game 3d engine.
If you don't have performance issue then the hook is not necessary.

Re: Hook_D3d.dll Bug Report

Posted: Tue May 05, 2020 8:20 pm
by Darksaber
To be brutally honest I don't actually play the game, I just test stuff in skirmish and the proving grounds lol

Don't you need this hook for Blue Max's effects though?

Re: Hook_D3d.dll Bug Report

Posted: Tue May 05, 2020 8:36 pm
by JeremyaFr
I think it can work without.

Re: Hook_D3d.dll Bug Report

Posted: Tue May 05, 2020 8:37 pm
by Darksaber
Thanks for everything :)

Re: Hook_D3d.dll Bug Report

Posted: Tue May 05, 2020 9:09 pm
by Kampher
Just as a test I turned this hook off and it fudges with dynamic cockpits and Blue's effects. I would leave this on.

Re: Hook_D3d.dll Bug Report

Posted: Tue May 05, 2020 9:11 pm
by Darksaber
at present I don't have them installed

Re: Hook_D3d.dll Bug Report

Posted: Thu May 07, 2020 4:45 pm
by blue_max
Kampher wrote:
Tue May 05, 2020 9:09 pm
Just as a test I turned this hook off and it fudges with dynamic cockpits and Blue's effects. I would leave this on.
Sorry; but this is not true. To properly disable the hook_d3d you need to remove/disable the DLL and also modify the cfg file to say "IsHookD3DEnabled = 0". I just double-checked and all the effects and DC work fine even with this hook disabled... unless you did something else, of course, in which case feel free to report the bug again.

Since we're in this topic: Jeremy, I updated my hooks using your tool yesterday and the default setting for "IsHookD3DEnabled" seems to be 0. So, this causes the geometry to be messed up since the hook is actually present in the downloads (I just copied all the files downloaded from the tool into my XWA directory).

Re: Hook_D3d.dll Bug Report

Posted: Thu May 07, 2020 6:09 pm
by JeremyaFr
UPDATE
I've updated the d3d hook. Now it is enbaled by default.

It was disabled by default because it requires a DDraw update. Now the the DDraw dll supports it, the hook can be enabled by default. I've changed that.

Re: Hook_D3d.dll Bug Report

Posted: Thu May 07, 2020 7:13 pm
by Kampher
blue_max wrote:
Thu May 07, 2020 4:45 pm
Kampher wrote:
Tue May 05, 2020 9:09 pm
Just as a test I turned this hook off and it fudges with dynamic cockpits and Blue's effects. I would leave this on.
Sorry; but this is not true. To properly disable the hook_d3d you need to remove/disable the DLL and also modify the cfg file to say "IsHookD3DEnabled = 0". I just double-checked and all the effects and DC work fine even with this hook disabled... unless you did something else, of course, in which case feel free to report the bug again.

Since we're in this topic: Jeremy, I updated my hooks using your tool yesterday and the default setting for "IsHookD3DEnabled" seems to be 0. So, this causes the geometry to be messed up since the hook is actually present in the downloads (I just copied all the files downloaded from the tool into my XWA directory).
Hi Blue. I merely deleted the .dll but forgot to tell the cfg file to say "IsHookD3DEnabled = 0". My mistake!

Re: Hook_D3d.dll Bug Report

Posted: Thu May 07, 2020 7:23 pm
by blue_max
Kampher wrote:
Thu May 07, 2020 7:13 pm
Hi Blue. I merely deleted the .dll but forgot to tell the cfg file to say "IsHookD3DEnabled = 0". My mistake!
No worries, glad we got to the bottom of this.

@Jeremy: Thanks!

Re: Hook_D3d.dll Bug Report

Posted: Sun Sep 20, 2020 1:34 am
by Ace Antilles
JeremyaFr wrote:
Mon May 04, 2020 3:08 pm
Thanks for the bug report.
I will take a look.
I can confirm this issue is still happening and it can really mess up the hangar. This happens in the Proving Grounds and Calamaris.
The hangar roof lights are not illuminated in every number pad position.
As the droids or cranes move then they will sometimes turn on.
bug1.jpg

Also the shadows under the workstands are flickering in and out and you can see glitches at times.
I tried to take pics but it's too quick and ramdom.
bug2.jpg

By disabling Hook_D3d.dll and setting the Hooks.ini to IsHookD3DEnabled = 0 the issue does not appear and is ok.
Obviously this will not be good as it does effect the new Wireframe Effects such as wireframe and the game jerks.

The issue isn't there in a normal version with NO effects installed as far as I can see.
Latest hook but I included it just in case.

Re: Hook_D3d.dll Bug Report

Posted: Sun Sep 20, 2020 3:13 pm
by JeremyaFr
Hello,
Does this happen with the new effects DDraw dll only, or also with the golden DDraw dll?

Re: Hook_D3d.dll Bug Report

Posted: Sun Sep 20, 2020 4:42 pm
by Ace Antilles
JeremyaFr wrote:
Sun Sep 20, 2020 3:13 pm
Hello,
Does this happen with the new effects DDraw dll only, or also with the golden DDraw dll?
I have had several random results. The only sure thing I can tell you is when Hook_D3d.dll is disabled and renamed the issue is fixed.

I've moved hooks and DDraw and it makes no difference. I've got a test install that has Effects installed on and it works perfectly!
Yet other ones the issue is always there. Here's something that may help.

Install 1: DDraw dll - 1.3.11.0 = No issues. This has NEVER had Effects installed on it.

Install 2: DDraw dll - 1.1.4.1. VR = issues, with Effects ON

Install 2a: DDraw dll - 1.3.11.0 = Issues. Copied the DDraw over without removing the Effects normally. The issue is there. I've also had some crashes.

Jeremy load up our WIP04 test from the Beta forum. Normally the easiest way to see it is by pressing NumPad 2 and waiting a bit.

Re: Hook_D3d.dll Bug Report

Posted: Sun Sep 20, 2020 5:36 pm
by DTM
I confirm the problem. I experimented it few days ago, when I was setting up the Hangar Objects for the new Calamari Hangar. I supposed there was a problem with my new hangar opt, BUT than I used the same Hangar Objects settings with the old hangar, and this bug happened also using the old hangar...it looks linked also with the number or type of objects present into the hangar (?) I use DDraw dll - 1.1.4.1. VR

Re: Hook_D3d.dll Bug Report

Posted: Sun Sep 20, 2020 7:08 pm
by JeremyaFr
WIP

Hello,
You can try that:

EDIT: link removed

Re: Hook_D3d.dll Bug Report

Posted: Sun Sep 20, 2020 7:21 pm
by Ronin65
Nope still loosing shadows, transparent meshes and engine glows, also if you leave the Hook_D3D.dll in the main folder, but disable it in the Hooks.ini enter the pilot proving ground, all you see it stars

Re: Hook_D3d.dll Bug Report

Posted: Sun Sep 20, 2020 7:42 pm
by JeremyaFr
An other test:

Code: Select all

<Patch Name="[WIP] fix render states initializing">
  <Item Offset="197B2D" From="8B15CC1C7B00C70215000000A1CC1C7B00C74004010000008B0DCC1C7B0083C108890DCC1C7B00" To="8B55C4909090C702150000008B45C49090C74004010000008B4DC490909083C108894DC4909090" />
  <Item Offset="197B66" From="A1CC1C7B00C700150000008B0DCC1C7B00C74104040000008B15CC1C7B0083C2088915CC1C7B00" To="8B45C49090C700150000008B4DC4909090C74104040000008B55C490909083C2088955C4909090" />
  <Item Offset="197B8F" From="A1CC1C7B00C700150000008B0DCC1C7B00C74104020000008B15CC1C7B0083C2088915CC1C7B00" To="8B45C49090C700150000008B4DC4909090C74104020000008B55C490909083C2088955C4909090" />
</Patch>

Re: Hook_D3d.dll Bug Report

Posted: Sun Sep 20, 2020 7:50 pm
by Ronin65
Ok tested that, I still have no shadows or transparent meshes with number pad keys 2,3 and 9

Re: Hook_D3d.dll Bug Report

Posted: Sun Sep 20, 2020 10:43 pm
by Ace Antilles
JeremyaFr wrote:
Sun Sep 20, 2020 7:08 pm
WIP
Hello,
You can try that:
Sorry no difference.

Re: Hook_D3d.dll Bug Report

Posted: Mon Sep 21, 2020 5:50 am
by blue_max
I updated my hook_d3d.dll and the hook_hangar.dll and I see no issues. I also downloaded Jeremy's WIP hook_d3d above, and things still look fine. I mean, the shadows don't look perfect in the hangar (they seem to have transparency -- that's a bug in my ddraw), but they are there and everything else looks fine.

I don't think I've got any custom hangars installed, though. Does this happen with a specific hangar perhaps?