Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
sodaboy581 opened this issue Dec 4, 2022 · 9 comments · Fixed by #4015
Closed

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

sodaboy581 opened this issue Dec 4, 2022 · 9 comments · Fixed by #4015
Assignees

Comments

@sodaboy581
Copy link

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

@sodaboy581
Copy link
Author

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.

@Blisto91
Copy link
Contributor

Blisto91 commented Dec 4, 2022

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

@sodaboy581
Copy link
Author

sodaboy581 commented Dec 4, 2022

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.

@K0bin
Copy link
Collaborator

K0bin commented Dec 4, 2022

Please make an apitrace of the game.

@sodaboy581
Copy link
Author

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.

@K0bin
Copy link
Collaborator

K0bin commented Dec 4, 2022

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.

@Blisto91
Copy link
Contributor

Blisto91 commented Dec 4, 2022

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

Repository owner deleted a comment from WindSpirit48 Dec 5, 2022
@K0bin
Copy link
Collaborator

K0bin commented May 10, 2024

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.

@K0bin K0bin added bug and removed windows labels May 10, 2024
@K0bin K0bin self-assigned this May 10, 2024
@nolrinale
Copy link

nolrinale commented May 15, 2024

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants