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

Missing particle effects in Supreme Commander #2638

Closed
Flypaste opened this issue May 5, 2022 · 18 comments · Fixed by #2682
Closed

Missing particle effects in Supreme Commander #2638

Flypaste opened this issue May 5, 2022 · 18 comments · Fixed by #2682

Comments

@Flypaste
Copy link

Flypaste commented May 5, 2022

Supcom is missing a lot of particle effects, some of them critical to playing the game competitively. The easiest way to check if they're working properly is the gate in animation when you start a skirmish match. Here's an example of not working vs. working properly: https://imgur.com/a/WO2PJkc

There is a dll override you can load on windows called dgVoodoo that fixes this D3D9 to DX12 rendering issue. However on linux while this works, it causes random crashes after 10+ minutes of gametime. So it would be nice if this were fixed natively in DXVK since linux users can't use the dgVoodoo fix. dgVoodoo's creator comments on this when patching it: "I can reproduce it, and the reason of the erroneous rendering is as interesting as this game: it's a very special incompatibility between DX shader models (original and converted)."

@K0bin
Copy link
Collaborator

K0bin commented May 5, 2022

Please don't just ignore the issue template. We need an apitrace to look into this.

@K0bin K0bin added the d3d9 label May 5, 2022
@Flypaste
Copy link
Author

Flypaste commented May 5, 2022

Sorry this is my first time reporting an issue on github, I'll go find it

@WinterSnowfall
Copy link
Contributor

WinterSnowfall commented May 5, 2022

Interesting... I've actually never played the game on Windows (or tried it with WineD3D for that matter), so never knew those effects were missing... it always looked good enough to me 😅. I can probably get you a trace at some point if @Flypaste finds that too hard to do.

Edit: The said effects are not showing with WineD3D either apparently.

@Flypaste
Copy link
Author

Flypaste commented May 5, 2022

Ok so the template just... didn't appear when I made that first report. I clicked "submit an issue" and it just gave me a blank textbox. I found the template with a different submit an issue button.

I tried to get the apitrace, but it didn't work as expected. When I set the dll overrides in winecfg, nothing happened. So instead I set the dll overrides in the steam launch options with this command: WINEDLLOVERRIDES="d3d9=n,d3d11=n,dxgi=n" PROTON_USE_WINED3D=1
This generates the trace but the file is empty, and most importantly the game just crashes instantly saying it can't create the D3D device. So I had to disable D3D and go back to DXVK. Note that this crash does not happen when I remove the overrides and keep D3D.

Software information

Supreme commander forged alliance, but the issue is also present in the base game and in forged alliance forever.

System information

  • GPU: RX 5700XT
  • Driver: 22.0.2
  • Wine version: 7.7
  • DXVK version: v1.7-8-g51531e4a7

Apitrace file(s)

Log files

@WinterSnowfall
Copy link
Contributor

WinterSnowfall commented May 5, 2022

Here's a trace captured with WineD3D, if that helps at all in this case: https://drive.google.com/file/d/1RJ7QglyjP0XB-PnQCmvE4IU5o-OzGr8v/view?usp=sharing

As I mentioned above, WineD3D doesn't fare any better and doesn't show the effects I've seen in @Flypaste's recording.

I tried setting d3d9.shaderModel = 2 & d3d9.shaderModel = 1 to see if that helps in any way, but it did not. The game refused to run at all with d3d9.shaderModel = 1, saying that it needs support for 2.0 at least.

One last thing to mention is that I'm on Nvidia and seeing the same thing, so the probability of it being something AMD-specific is highly unlikely. I'm also using the latest master build, not v1.7, but still getting the same.

@WinterSnowfall
Copy link
Contributor

I set the dll overrides in the steam launch options with this command: WINEDLLOVERRIDES="d3d9=n,d3d11=n,dxgi=n"

FYI, you only need WINEDLLOVERRIDES="d3d9=n,b" for the apitrace d3d9.dll to do its work. Setting it simply to "n" will get you the "failed to create Direct3D9 Device" message you mentioned.

@K0bin
Copy link
Collaborator

K0bin commented May 27, 2022

I can't really tell whats wrong with it based on your imgur clips. The two look the same to me except that one is in a desert.

Here's what replaying your apitrace looked like for me.
image
image

Can you please describe the issue a bit more in depth and post some more comparison screenshots?

@WinterSnowfall
Copy link
Contributor

@K0bin Here's what I'm seeing (and I think Flypaste is seeing as well). That being said, I'm not entirely sure what is causing the missing effects in both dxvk and WineD3D, since I have all the d3dx9 and d3dcompiler winetricks in my prefix...

@Flypaste
Copy link
Author

Flypaste commented Jun 1, 2022

Yup winter has shown it. This warping in swirl effect is the easiest way to troubleshoot the issue since you can see it immediately, but a LOT of shader-based effects are missing throughout the game. Someone who patched this on windows mentioned that the issue is happening because old directx shader models are being converted incorrectly. So if I were to make an unedcuated guess, I'd wager that there's something wrong with the DX9 -> Windows 11 implementation, and that same issue is present in the DX9 -> Vulkan/WineD3D implementation. Most noteworthy, whatever the dgVoodoo creator did that fixed it for windows 11, also works to fix it for Vulkan/WineD3D. It's just the game crashes intermittently using his dll hack. I don't have any more information on the source of the problem beyond that, though.

@Blisto91
Copy link
Contributor

Blisto91 commented Jun 12, 2022

So can reproduce this if i use dxvk 1.7. But not when using proton 7.0-2 (dxvk 1.10.1), 7.0-3RC or dxvk 1.10.1 from github.

@WinterSnowfall
Copy link
Contributor

So can reproduce this if i use dxvk 1.7. But not when using proton 7.0-2 (dxvk 1.10.1), 7.0-3RC or dxvk 1.10.1 from github.

Hmmm... so maybe this is not something dxvk specific after all, but rather an issue fixed by a Proton hack. That would explain the above, since I assume @K0bin is using Proton, while I am on Wine Staging.

@Blisto91
Copy link
Contributor

Blisto91 commented Jun 12, 2022

@WinterSnowfall Which driver do you use?
This seems like a floatEmulation issue, since i can reproduce it if i change it to true. dxvk changes it to strict by default if you use radv/mesa 22 or above. strict wasn't a option in dxvk 1.7 yet.

@WinterSnowfall
Copy link
Contributor

WinterSnowfall commented Jun 12, 2022

@WinterSnowfall Which driver do you use?

I thought everyone knew by now I'm an Nvidia peasant :). I currently have a GTX 1080 on my main gaming rig and an Intel Xe Graphics powered laptop at my disposal.

This seems like a floatEmulation issue, since i can reproduce it if i change it to true.

Alright, let me give it a shot. Thanks for the tip 👍 .

@Blisto91
Copy link
Contributor

I thought everyone knew by now I'm an Nvidia peasant :).

My memory is shit xd.

Once you've verified d3d9.floatEmulation = Strict work we can make a pr.

@WinterSnowfall
Copy link
Contributor

Once you've verified d3d9.floatEmulation = Strict work we can make a pr.

Yes, that fixed it 🥳 . @Blisto91 please prep a PR for launch 🚀 . Both the original game and Forged Alliance have the executable named SupremeCommander.exe so this should fix the issue in both games, which is perfect.

@Blisto91
Copy link
Contributor

🎉 👍

Do you know if supreme commander 2 have similar issues?

@WinterSnowfall
Copy link
Contributor

They dropped the fancy warp-in effects at the start of the game in SupCom2, so there's no really easy way to tell... and I no longer have a Windows machine around to compare it against otherwise, unfortunately.

@Blisto91
Copy link
Contributor

Rgr. I will make a note of it to check later if i get the game.

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