VOGONS


First post, by davidmorom

User metadata
Rank Newbie
Rank
Newbie

Hi Dege! I found a regression that was introduced in 2.82.2 (works fine in 2.82.1 and older) that affects House of the Dead 2. The textures of the fishes that the boss of the second stage throws at you are partially white. I completed the game (only one time, so no alternative routes), and this is the only affected texture I found. I attach an screenshot to illustrate the problem.

To test it, the fastest way is to use the Boss Mode, so you can go straight to the second stage boss fight.

Thanks for your work!

The attachment 1.png is no longer available

Reply 1 of 17, by Dege

User metadata
Rank l33t
Rank
l33t
davidmorom wrote on 2025-03-17, 09:50:
Hi Dege! I found a regression that was introduced in 2.82.2 (works fine in 2.82.1 and older) that affects House of the Dead 2. T […]
Show full quote

Hi Dege! I found a regression that was introduced in 2.82.2 (works fine in 2.82.1 and older) that affects House of the Dead 2. The textures of the fishes that the boss of the second stage throws at you are partially white. I completed the game (only one time, so no alternative routes), and this is the only affected texture I found. I attach an screenshot to illustrate the problem.

To test it, the fastest way is to use the Boss Mode, so you can go straight to the second stage boss fight.

Thanks for your work!

The attachment 1.png is no longer available

Yes, I'm aware about this, but it's not a regression in fact. I noticed it when I fixed something in the lighting calculations to be compatible with MS D3D and that's the point where it got broken.
I checked it out with MS D3D and it looked the same (I also checked out old game walkthrough videos, looking the same).
The fish has a needless white specular material component (set to max, while normalization of the normal vectors are disabled) and that's why it looks like that. The game data files should be patched somehow to null out that component.

Reply 2 of 17, by davidmorom

User metadata
Rank Newbie
Rank
Newbie
Dege wrote on 2025-03-18, 06:22:
Yes, I'm aware about this, but it's not a regression in fact. I noticed it when I fixed something in the lighting calculations t […]
Show full quote
davidmorom wrote on 2025-03-17, 09:50:
Hi Dege! I found a regression that was introduced in 2.82.2 (works fine in 2.82.1 and older) that affects House of the Dead 2. T […]
Show full quote

Hi Dege! I found a regression that was introduced in 2.82.2 (works fine in 2.82.1 and older) that affects House of the Dead 2. The textures of the fishes that the boss of the second stage throws at you are partially white. I completed the game (only one time, so no alternative routes), and this is the only affected texture I found. I attach an screenshot to illustrate the problem.

To test it, the fastest way is to use the Boss Mode, so you can go straight to the second stage boss fight.

Thanks for your work!

The attachment 1.png is no longer available

Yes, I'm aware about this, but it's not a regression in fact. I noticed it when I fixed something in the lighting calculations to be compatible with MS D3D and that's the point where it got broken.
I checked it out with MS D3D and it looked the same (I also checked out old game walkthrough videos, looking the same).
The fish has a needless white specular material component (set to max, while normalization of the normal vectors are disabled) and that's why it looks like that. The game data files should be patched somehow to null out that component.

Interesting information. I wonder what factors make the issue to show up, as I clearly remember playing this game back in the day with a TNT2, but I don't remember this issue at all. I even tested the game emulating a Voodoo 3 with PCem and it is also fine. Maybe this old cards have some kind of limitation that prevents the issue to be displayed, and so the original developers didn't noticed it.

We are lucky this only seems to affect the fishes. Anyway, I'll keep 2.82.1 just for this very specific use case.

Thank you!

Reply 3 of 17, by Dege

User metadata
Rank l33t
Rank
l33t
davidmorom wrote on 2025-03-18, 11:19:
Interesting information. I wonder what factors make the issue to show up, as I clearly remember playing this game back in the da […]
Show full quote
Dege wrote on 2025-03-18, 06:22:
Yes, I'm aware about this, but it's not a regression in fact. I noticed it when I fixed something in the lighting calculations t […]
Show full quote
davidmorom wrote on 2025-03-17, 09:50:
Hi Dege! I found a regression that was introduced in 2.82.2 (works fine in 2.82.1 and older) that affects House of the Dead 2. T […]
Show full quote

Hi Dege! I found a regression that was introduced in 2.82.2 (works fine in 2.82.1 and older) that affects House of the Dead 2. The textures of the fishes that the boss of the second stage throws at you are partially white. I completed the game (only one time, so no alternative routes), and this is the only affected texture I found. I attach an screenshot to illustrate the problem.

To test it, the fastest way is to use the Boss Mode, so you can go straight to the second stage boss fight.

Thanks for your work!

The attachment 1.png is no longer available

Yes, I'm aware about this, but it's not a regression in fact. I noticed it when I fixed something in the lighting calculations to be compatible with MS D3D and that's the point where it got broken.
I checked it out with MS D3D and it looked the same (I also checked out old game walkthrough videos, looking the same).
The fish has a needless white specular material component (set to max, while normalization of the normal vectors are disabled) and that's why it looks like that. The game data files should be patched somehow to null out that component.

Interesting information. I wonder what factors make the issue to show up, as I clearly remember playing this game back in the day with a TNT2, but I don't remember this issue at all. I even tested the game emulating a Voodoo 3 with PCem and it is also fine. Maybe this old cards have some kind of limitation that prevents the issue to be displayed, and so the original developers didn't noticed it.

We are lucky this only seems to affect the fishes. Anyway, I'll keep 2.82.1 just for this very specific use case.

Thank you!

Maybe something with normal normalization in software vs hardware vertex processing, the TNT2 is not a TnL hardware. They should not be different though... I might have a look into it again.

Reply 4 of 17, by davidmorom

User metadata
Rank Newbie
Rank
Newbie
Dege wrote on 2025-03-19, 06:42:
davidmorom wrote on 2025-03-18, 11:19:
Interesting information. I wonder what factors make the issue to show up, as I clearly remember playing this game back in the da […]
Show full quote
Dege wrote on 2025-03-18, 06:22:

Yes, I'm aware about this, but it's not a regression in fact. I noticed it when I fixed something in the lighting calculations to be compatible with MS D3D and that's the point where it got broken.
I checked it out with MS D3D and it looked the same (I also checked out old game walkthrough videos, looking the same).
The fish has a needless white specular material component (set to max, while normalization of the normal vectors are disabled) and that's why it looks like that. The game data files should be patched somehow to null out that component.

Interesting information. I wonder what factors make the issue to show up, as I clearly remember playing this game back in the day with a TNT2, but I don't remember this issue at all. I even tested the game emulating a Voodoo 3 with PCem and it is also fine. Maybe this old cards have some kind of limitation that prevents the issue to be displayed, and so the original developers didn't noticed it.

We are lucky this only seems to affect the fishes. Anyway, I'll keep 2.82.1 just for this very specific use case.

Thank you!

Maybe something with normal normalization in software vs hardware vertex processing, the TNT2 is not a TnL hardware. They should not be different though... I might have a look into it again.

Seems you are totally right, as always! I tested the game with MS D3D trough DxWnd enabling the "No TnL HAL Device" option and it worked fine. What do you think about adding another virtual card, like the TNT2, without TnL capabilities? Maybe there are more games that exhibit this kind of issues when using HW TnL.

Reply 5 of 17, by Dege

User metadata
Rank l33t
Rank
l33t
davidmorom wrote on 2025-03-19, 08:47:
Dege wrote on 2025-03-19, 06:42:
davidmorom wrote on 2025-03-18, 11:19:

Interesting information. I wonder what factors make the issue to show up, as I clearly remember playing this game back in the day with a TNT2, but I don't remember this issue at all. I even tested the game emulating a Voodoo 3 with PCem and it is also fine. Maybe this old cards have some kind of limitation that prevents the issue to be displayed, and so the original developers didn't noticed it.

We are lucky this only seems to affect the fishes. Anyway, I'll keep 2.82.1 just for this very specific use case.

Thank you!

Maybe something with normal normalization in software vs hardware vertex processing, the TNT2 is not a TnL hardware. They should not be different though... I might have a look into it again.

Seems you are totally right, as always! I tested the game with MS D3D trough DxWnd enabling the "No TnL HAL Device" option and it worked fine. What do you think about adding another virtual card, like the TNT2, without TnL capabilities? Maybe there are more games that exhibit this kind of issues when using HW TnL.

I didn't check it out, but you get different results with a non-TnL and TnL device through MS D3D, if I get it right?
I have a guess then, unlike hardware vertex processing, software does local space lighting when possible. It does not necessarily yield the same result if normalization of normal vectors are disabled.
The same issue as here:
Re: Graphic Issues in "B5 Into the Fire" alpha game.

Anyway, I'm not against having a virtual card without TnL capabilities, like the famous TNT2. But localspace lighting must be implemented first...

Reply 6 of 17, by davidmorom

User metadata
Rank Newbie
Rank
Newbie
Dege wrote on 2025-03-19, 12:40:
I didn't check it out, but you get different results with a non-TnL and TnL device through MS D3D, if I get it right? I have a g […]
Show full quote
davidmorom wrote on 2025-03-19, 08:47:
Dege wrote on 2025-03-19, 06:42:

Maybe something with normal normalization in software vs hardware vertex processing, the TNT2 is not a TnL hardware. They should not be different though... I might have a look into it again.

Seems you are totally right, as always! I tested the game with MS D3D trough DxWnd enabling the "No TnL HAL Device" option and it worked fine. What do you think about adding another virtual card, like the TNT2, without TnL capabilities? Maybe there are more games that exhibit this kind of issues when using HW TnL.

I didn't check it out, but you get different results with a non-TnL and TnL device through MS D3D, if I get it right?
I have a guess then, unlike hardware vertex processing, software does local space lighting when possible. It does not necessarily yield the same result if normalization of normal vectors are disabled.
The same issue as here:
Re: Graphic Issues in "B5 Into the Fire" alpha game.

Anyway, I'm not against having a virtual card without TnL capabilities, like the famous TNT2. But localspace lighting must be implemented first...

Not exactly. I used the same device, a 4070 with Windows 10 native D3D. If I run the game directly, the issue is present. If I run the game trough DxWnd enabling the option "Direct3D(2) -> No TnL HAL Device", the textures are correctly displayed. According to DxWnd documentation, this option does the following: "Suppresses the IID_IDirect3DTnLHalDevice device type in device enumeration (see EnumDevices method)".

Sorry if I wasn't clear enough on my previous post. I hope this brings some light to the issue.

Reply 7 of 17, by Dege

User metadata
Rank l33t
Rank
l33t
davidmorom wrote on 2025-03-19, 13:17:
Dege wrote on 2025-03-19, 12:40:
I didn't check it out, but you get different results with a non-TnL and TnL device through MS D3D, if I get it right? I have a g […]
Show full quote
davidmorom wrote on 2025-03-19, 08:47:

Seems you are totally right, as always! I tested the game with MS D3D trough DxWnd enabling the "No TnL HAL Device" option and it worked fine. What do you think about adding another virtual card, like the TNT2, without TnL capabilities? Maybe there are more games that exhibit this kind of issues when using HW TnL.

I didn't check it out, but you get different results with a non-TnL and TnL device through MS D3D, if I get it right?
I have a guess then, unlike hardware vertex processing, software does local space lighting when possible. It does not necessarily yield the same result if normalization of normal vectors are disabled.
The same issue as here:
Re: Graphic Issues in "B5 Into the Fire" alpha game.

Anyway, I'm not against having a virtual card without TnL capabilities, like the famous TNT2. But localspace lighting must be implemented first...

Not exactly. I used the same device, a 4070 with Windows 10 native D3D. If I run the game directly, the issue is present. If I run the game trough DxWnd enabling the option "Direct3D(2) -> No TnL HAL Device", the textures are correctly displayed. According to DxWnd documentation, this option does the following: "Suppresses the IID_IDirect3DTnLHalDevice device type in device enumeration (see EnumDevices method)".

Sorry if I wasn't clear enough on my previous post. I hope this brings some light to the issue.

That's what I thought of.
By default, the TnL device is picked up by the game so it has hw vertex processing. If you disable it through DxWnd then a plain HAL device is used with sw vertex processing.

Reply 8 of 17, by Dege

User metadata
Rank l33t
Rank
l33t

I implemented D3D software-equivalent vertex processing + model space lighting in non-TnL devices, now the glitch does not come with TnL disabled.

Anyway, I'm not against having a virtual card without TnL capabilities, like the famous TNT2. But localspace lighting must be implemented first...

I chose to have an option DirectX\DisableD3DTnLDevice after all. Having a TNT2 card would mean limiting a lot of things, like number of texture stages, etc.
This way the non-TnL device can be forced for all virtual cards.

Reply 9 of 17, by davidmorom

User metadata
Rank Newbie
Rank
Newbie

Great news! Do you have a WIP so I can test it?

Reply 10 of 17, by Dege

User metadata
Rank l33t
Rank
l33t

Yes, there is, I released one just now.

Reply 11 of 17, by davidmorom

User metadata
Rank Newbie
Rank
Newbie

Very nice work, Dege! I made a quick test, and now the affected models are rendered correctly, but the fog is totally broken. Running the game trough MS D3D with TnL forced off renders the fog fine, so it's not a game side issue.

The attachment 2.png is no longer available
The attachment 1.png is no longer available

Reply 12 of 17, by Dege

User metadata
Rank l33t
Rank
l33t

How can that be?
Fog shouldn't be affected and I have it:

This is with TnL disabled

Reply 13 of 17, by davidmorom

User metadata
Rank Newbie
Rank
Newbie

I've been investigating the issue, and I found the root cause, it is a problem on my side. I don't know why, some time ago the game started to behave strangely. Every time I launch the game, with or without dgVoodoo, the game displays a couple of message boxes asking whether I want to use the Direct3D TnL Accelerated Device, or the Direct3D RGB Software emulation device (see the attached images). For some reason the game started to think that the RGB emulation is a good device to choose.

If I choose the RGB device without dgVoodoo, the game closes immediately. But If I choose it using dgVoodoo, the game works, but without fog (maybe the game disables it on purpose because it detects the GPU has no fog capabilities, I don't know). Now, with the new "Disable TnL" option, as the TnL HAL is not enumerated, the game doesn't show the message boxes and defaults to the RGB device, so it works fine but without fog.

If I create a new user account, the issue disappears, the game stops showing the message boxes and everything works as intended. But when I log back to my main account, the problem comes back. Seems pretty obvious I must have some weird setting on the registry or some configuration file, maybe I touched something in the past, I will take a look when I have time, as it is very weird.

Anyway, it's not dgVoodoo's fault, and it is working fine, so you can consider the issue solved. Great work!

PS: when I have some free time I will complete the game a couple of times, trough different routes, to check if everything is rendered as expected.

The attachment 2.png is no longer available
The attachment 1.png is no longer available

Reply 14 of 17, by BEEN_Nath_58

User metadata
Rank l33t
Rank
l33t
davidmorom wrote on 2025-03-30, 21:22:

If I choose the RGB device without dgVoodoo, the game closes immediately. But If I choose it using dgVoodoo, the game works, but without fog (maybe the game disables it on purpose because it detects the GPU has no fog capabilities, I don't know). Now, with the new "Disable TnL" option, as the TnL HAL is not enumerated, the game doesn't show the message boxes and defaults to the RGB device, so it works fine but without fog.

The attachment 2.png is no longer available
The attachment 1.png is no longer available

I could be wrong but I never saw fog in games when using RGB devices. Can Dege tell if RGB has fog support?

I see one thing: Dege's screenshot seems to be point-filtered but yours doesn't.

previously known as Discrete_BOB_058

Reply 15 of 17, by davidmorom

User metadata
Rank Newbie
Rank
Newbie

Problem solved. I had some weird files on my account "AppData\Local\VirtualStore\Windows" folder. I deleted them and the game now selects the correct device without asking. With resolution forcing, texture filtering, 8x MSAA, 8x SGSSAA and the TnL textures issue fixed, the game is pure perfection again.

EDIT: the problem was the file "AppData\Local\VirtualStore\Windows\d3dx.dat", after deleting it, another one was created by the game, and everything started to behave as it should. This file seems to be a cache of Direct3D devices and their capabilities. I remember, in the past, I was tinkering with WineD3d, and I think that's the reason the game included the RGB device on that cache.

Reply 16 of 17, by Dege

User metadata
Rank l33t
Rank
l33t

Great!
The RGB device supports fog. Experimentally I disabled all devices except RGB in Hod2.exe but the rendering is completely broken natively.
But there is no fog, at least.

Reply 17 of 17, by davidmorom

User metadata
Rank Newbie
Rank
Newbie

I completed the game a couple of times trough different routes and I didn't notice any visual glitch. Every pixel is exactly where is supposed to be. Awesome work, Dege!