VOGONS


First post, by kefir

User metadata
Rank Newbie
Rank
Newbie

Hello! I'm not sure if I should post this here, but here goes! The game Artificial Academy 2 has a small issue when using the latest dgvoodoo2. Transparent hairs don't cast shadows.ZdS7EDO.png
This is what it should be like, and this is what it shows:
xPDotyW.png.
It's not a big deal, but it would be awesome if you fixed it! It can get a bit more apparent depending on the character being displayed though.

Reply 1 of 14, by kefir

User metadata
Rank Newbie
Rank
Newbie
Dege wrote on 2020-11-02, 16:36:
I've released the cumulated fixings: […]
Show full quote

I've released the cumulated fixings:

v2.71.3:

- Fixing a bug in the DXBC generator (Metal Gear 2 Solid Substance, the original version)
- Making DDraw device window creation compatible with MS DDraw (Everquest)
- Minor improvement in the DDraw hook layer (Submarine Titans)
- Fixing a bug in the shader code validator (Anarchy Online)
- Implementing a minor missing thing in the D3D12 backend (Anarchy Online, but affects other appications as well)
- Fixing a Glide texture upload bug (Montezuma's Return)
- Fixing a thing incompatible with MS D3D (Christmas Magic)
- Fixing a minor D3D12 leak

http://dege.fw.hu/dgVoodoo2/dgVoodoo2_71_3.zip
http://dege.fw.hu/dgVoodoo2/dgVoodoo2_71_3_dbg.zip

Oh I just realized, in case you need the card to replicate the issue, here it is. https://db.bepis.io/aa2/view/51955

Reply 2 of 14, by kefir

User metadata
Rank Newbie
Rank
Newbie
Dege wrote on 2020-11-08, 16:23:

Ok, I'll check those games out, but unfortunately I have little free time nowadays

Thank you. I should probably also mention that the shadow issue also happens on native in windows 10. But they work in windows 7.

Reply 4 of 14, by Dege

User metadata
Rank l33t
Rank
l33t
kefir wrote on 2020-12-11, 08:15:
Here's another image with the missing shadows. Left is voodoo, right is dxvk. It seems that the issue only affects transparent t […]
Show full quote

Here's another image with the missing shadows. Left is voodoo, right is dxvk. It seems that the issue only affects transparent textures.
V5pins6.png

But, what's the difference? 😀

Reply 5 of 14, by kefir

User metadata
Rank Newbie
Rank
Newbie
Dege wrote on 2020-12-11, 10:44:
kefir wrote on 2020-12-11, 08:15:
Here's another image with the missing shadows. Left is voodoo, right is dxvk. It seems that the issue only affects transparent t […]
Show full quote

Here's another image with the missing shadows. Left is voodoo, right is dxvk. It seems that the issue only affects transparent textures.
V5pins6.png

But, what's the difference? 😀

It's missing the shadow for transparent textures. It honestly doesn't bother me that much but the whole community is screaming at me to ask you to fix it.
lQRbaax.png
Gotta say tho the game runs really stable nowadays with voodoo, so big thanks for that!

Reply 6 of 14, by kefir

User metadata
Rank Newbie
Rank
Newbie
kefir wrote on 2020-12-11, 14:31:
It's missing the shadow for transparent textures. It honestly doesn't bother me that much but the whole community is screaming a […]
Show full quote
Dege wrote on 2020-12-11, 10:44:
kefir wrote on 2020-12-11, 08:15:
Here's another image with the missing shadows. Left is voodoo, right is dxvk. It seems that the issue only affects transparent t […]
Show full quote

Here's another image with the missing shadows. Left is voodoo, right is dxvk. It seems that the issue only affects transparent textures.
V5pins6.png

But, what's the difference? 😀

It's missing the shadow for transparent textures. It honestly doesn't bother me that much but the whole community is screaming at me to ask you to fix it.
lQRbaax.png
Gotta say tho the game runs really stable nowadays with voodoo, so big thanks for that!

Shit, noticed a typo in that previous message. Left is dxvk*, right is voodoo.

Reply 8 of 14, by Dege

User metadata
Rank l33t
Rank
l33t

I've just checked out AA2 and the shadow bug you reported.
Loading the card you linked to, the character appeared with completely black skin and brown hair, for some reason.
But, I edited it and created a new character based on that.

Strangely(?), the hair casts shadow if I open the character from the game (AA) and it does not when rendered in the editor (AA2Edit).
The situation is the same natively on both Win10 and Win7.

See the attached pictures, native Win7 (I accidentally swapped the file names...)

AA.png

AA2Edit.png

Isn't it the expected behavior?
I cannot see a bug here, Win7, Win10 and dgVoodoo (DX11, DX12) all work the same way here, on my test cases.

Reply 9 of 14, by kefir

User metadata
Rank Newbie
Rank
Newbie
Dege wrote on 2020-12-16, 10:59:
I've just checked out AA2 and the shadow bug you reported. Loading the card you linked to, the character appeared with completel […]
Show full quote

I've just checked out AA2 and the shadow bug you reported.
Loading the card you linked to, the character appeared with completely black skin and brown hair, for some reason.
But, I edited it and created a new character based on that.

Strangely(?), the hair casts shadow if I open the character from the game (AA) and it does not when rendered in the editor (AA2Edit).
The situation is the same natively on both Win10 and Win7.

See the attached pictures, native Win7 (I accidentally swapped the file names...)

AA.png

AA2Edit.png

Isn't it the expected behavior?
I cannot see a bug here, Win7, Win10 and dgVoodoo (DX11, DX12) all work the same way here, on my test cases.

Ah, I didn't think you had a vanilla install and weren't using a repack that already comes with some mods. That's why it isn't displaying properly, the shadows are only gone on transparent textures. You can get the compressed preinstalled repack from here, and that should open the character properly and display the issue. You don't need any mods except for what already comes with the torrent file so disregard the "IMPORTANT" part. If that's too much of a pain I'll ask some people to try to make an isolated standalone mod that could demonstrate it too. Sorry about the confusion.

Reply 10 of 14, by kefir

User metadata
Rank Newbie
Rank
Newbie

Here's another method that doesn't require downloading a repack for it. Here's the custom mod and a new card. https://a.pomf.cat/dzarxc.7z
If you have a completely vanilla install (meaning, two separate directories for AA2Play and AA2Make from ages ago), then download the zip and put the jg2e02_00_02_trans.pp file into your AA2Make/data folder. In case you have the mods "hexapp" or "hexaoc" downloaded, remove them. If not, just open this card in AA2Play clothing screen. This is what it looks like with shadows working in windows 7 or in windows 10 + dxvk

zDHWdq3.png

Reply 11 of 14, by Dege

User metadata
Rank l33t
Rank
l33t

Thanks, I tried your second option and now I can reproduce the problem with that test-card.

The thing is interesting, because dgVoodoo behaves the same as native D3D9:
- Win10: no hair shadow
- Win 7: hair shadow is there, see my screenshot

AA2-Win7dg-Voodoo.png

TBH, examining a rendered frame of the game reveals that the hair shadow is not dependent on the hair texture. At least, not directly, through D3D9.
Shadow is calculated into the face mesh (into texture coordinates) that are processed in a later stage in the vertex shader and the result is passed to the pixel shader to compose the final face texture from a base face texture + a skin color lookup texture (+ others... 😀 ).

But generating the mesh data itself is completely done by the game. I don't yet know what the shadow presence depends on, but it seems to be a thing coming from the difference of Win7/win10.
Don't ask why it works with other wrapper then.

It all is still to be figured out.

Reply 12 of 14, by kefir

User metadata
Rank Newbie
Rank
Newbie
Dege wrote on 2020-12-17, 20:57:
Thanks, I tried your second option and now I can reproduce the problem with that test-card. […]
Show full quote

Thanks, I tried your second option and now I can reproduce the problem with that test-card.

The thing is interesting, because dgVoodoo behaves the same as native D3D9:
- Win10: no hair shadow
- Win 7: hair shadow is there, see my screenshot

AA2-Win7dg-Voodoo.png

TBH, examining a rendered frame of the game reveals that the hair shadow is not dependent on the hair texture. At least, not directly, through D3D9.
Shadow is calculated into the face mesh (into texture coordinates) that are processed in a later stage in the vertex shader and the result is passed to the pixel shader to compose the final face texture from a base face texture + a skin color lookup texture (+ others... 😀 ).

But generating the mesh data itself is completely done by the game. I don't yet know what the shadow presence depends on, but it seems to be a thing coming from the difference of Win7/win10.
Don't ask why it works with other wrapper then.

It all is still to be figured out.

I see. Thanks for taking a look. Yeah, on native windows 7 there's a shadow, on native windows 10 there isn't. It's really strange.

Reply 13 of 14, by Dege

User metadata
Rank l33t
Rank
l33t

Meanwhile I tried dgVoodoo + Intel Graphics 530 with this game on Win10. Shadow was present! Even native D3D9 with Intel on Win10 worked.

So, I captured the exact same frame both with nVidia and Intel to see the difference in the graphics debugger.
Interestingly (sadly) one instruction of the shader code (with the same input values) gave different results on the GPU's, which implies that one of them was erroneous.

It must be a problem with Win10 nVidia drivers, it just doesn't like that shader, no matter what DX API it's driven through.
(But I remember having another problem earlier, nvidia again, some of the bra textures appeared wrong, it was unexplainable too.)

I cannot see a bug in dgVoodoo.
What about AMD cards? Somebody running this game on AMD?

Reply 14 of 14, by kefir

User metadata
Rank Newbie
Rank
Newbie
Dege wrote on 2020-12-18, 19:45:
Meanwhile I tried dgVoodoo + Intel Graphics 530 with this game on Win10. Shadow was present! Even native D3D9 with Intel on Win1 […]
Show full quote

Meanwhile I tried dgVoodoo + Intel Graphics 530 with this game on Win10. Shadow was present! Even native D3D9 with Intel on Win10 worked.

So, I captured the exact same frame both with nVidia and Intel to see the difference in the graphics debugger.
Interestingly (sadly) one instruction of the shader code (with the same input values) gave different results on the GPU's, which implies that one of them was erroneous.

It must be a problem with Win10 nVidia drivers, it just doesn't like that shader, no matter what DX API it's driven through.
(But I remember having another problem earlier, nvidia again, some of the bra textures appeared wrong, it was unexplainable too.)

I cannot see a bug in dgVoodoo.
What about AMD cards? Somebody running this game on AMD?

The issue seems to not happen on AMD, someone just tested it. It seems to be nVidia only.