protonscr

[d3d9] Phantasy Star Online Blue Burst missing textures with DXVK 2.0

dxvkclosed bugd3d9
doitsujin/dxvk#3117 · opened 2022-12-04 by sodaboy581 · updated 2024-05-21 · 9 comments · github
Ssodaboy581 2022-12-04 github

Using an NVIDIA 3090 card with 526.98 driver (also happens with AMD cards), textures are missing when playing Phantasy Star Online Blue Burst in D3D9 mode.

We are utilizing D3D8to9 to elevate the game to D3D9, which works fine otherwise when you play vanilla Direct3D 9, but with DXVK we have missing texture problems.

In the screenshots attached, you can see that the Gol Dragon's monitors are blank (they flicker in real time), the laser panel in the Forest is blank, and the laser effect for doorways in CCA is completely missing.

Running this under straight Windows 11.
pso133146478979985817
pso133146478433965829
pso133146478242960077

I'm also uploading shots of how they SHOULD look like...

pso133146485348188990

pso133146485816619457
pso133146486079441087

Here's the log file from the game...

psobb_d3d9.log

Ssodaboy581 2022-12-04 github

You can reproduce, if you have the time, by following these steps:

  1. Download the game client at https://ephinea.pioneer2.net/
  2. Make a "Sandbox" account on the same website.
  3. Configure the game from the launcher to use Vulkan.
  4. Log into the game.
  5. Once on a ship, create an Episode 2 game.
  6. Type "/warpme 15" without the quotations and hit enter.
  7. You should see the Gol Dragon monitor glitch immediately.
BBlisto91 2022-12-04 github

Hello. The "Game Download" button on the site gives me a "404 Not Found"

It might be worth trying out d8vk since if that ever gets merged into dxvk (nothing is official or decided afaik) i imagine d3d8to9 together with dxvk would become unsupported. It's still early in development but you can find the latest builds here https://github.com/AlpyneDreams/d8vk/actions/workflows/artifacts.yml?query=branch%3Amaster++

Edit: now the download worked

Ssodaboy581 2022-12-04 github

Hello. The "Game Download" button on the site gives me a "404 Not Found"

It might be worth trying out d8vk since if that ever gets merged into dxvk (nothing is official or decided afaik) i imagine d3d8to9 together with dxvk would become unsupported. It's still early in development but you can find the latest builds here https://github.com/AlpyneDreams/d8vk/actions/workflows/artifacts.yml?query=branch%3Amaster++

Edit: now the download worked

Yeah, that was my bad, I was refreshing the installer with the latest patches.

We could add d3d8 to VK, but a lot of people prefer d3d9 because of shader and add-on support.

KK0bin maintainer 2022-12-04 github

Please make an apitrace of the game.

Ssodaboy581 2022-12-04 github

OK, so, I've made a trace.

Strangely while making the trace with apitrace 11.1, the issue isn't present. Don't know if that's normal or not, but yeah, here's the trace file compressed to a 7-zip archive.

I was unable to upload the trace through GitHub as the file exceeded 25MB and 7z wasn't allowed. (Tried ZIP too but then it was twice the size.)

You can download the trace from https://files.pioneer2.net/PsoBB.trace.7z

Thanks.

KK0bin maintainer 2022-12-04 github

Strangely while making the trace with apitrace 11.1, the issue isn't present. Don't know if that's normal or not, but yeah, here's the trace file compressed to a 7-zip archive.

That's normal.

BBlisto91 2022-12-04 github

Thanks for the trace.
This seems to have worked back in d9vk 0.13f and then regressed in 0.20

KK0bin maintainer 2024-05-10 github

The problem here is that there's something wrong with how DXVK handles fixed function projected texture coordinates.

The game sets TEX1 as the only tex coord FVF bit. So we end up with a tex coord size of 2.
Meanwhile it sets 259 as the texture transform flags which is equivalent to PROJECTED | COUNT3.

DXVK ends up clamping to the texcoord size of 2 and thus uses the y coord as the value that the projection divides by.
That is most likely wrong. Changing it to z fixes the issue. Additionally the docs say the following:

The D3DTTFF_PROJECTED flag causes the rasterizer to divide the first two elements by the third (or n) element

Now the question is how exactly this is supposed to work. We don't want to break #3293 again.

EDIT: I think the correct thing to do is to disable projection if the texture coord fewer dimensions than the texture transform flags specify.

Nnolrinale 2024-05-15 github

Hello, I wanted to also offer my input as i've been witnessing the same issues with this specific game lately, I've tested with D8VK as I just want to run the game with its native D3D8 mode without need to use D3D8to9/Reshade and the game behaves with the same graphic issues as mentioned above by the OP.

Tested in both Linux (Fedora 40) under Wine 9.5 Staging and on a Steam Deck

Nothing extracted yet.