X-Hax / sa_tools

Sonic Adventure Toolset
http://info.sonicretro.org/SA_Tools
100 stars 24 forks source link

Improper Texture rendering under Wine/Linux #232

Closed coderman64 closed 1 year ago

coderman64 commented 1 year ago

[X] I am using the latest version of SA Tools. (Build Date: 12/14/2022)

[X] The problem is consistently reproducible.

[X] I have looked through the list of open issues and confirmed that the problem hasn't been reported before.

Describe the bug/request When running within Wine (Lutris Wine 7.2) on Linux, neither SALVL nor SAMDL properly renders textures. This happens with both DXVK v1.10.3 as well as WineD3D. It also has refreshing issues (I.E., changes made in the view do not always cause the scene to re-render).

To Reproduce (if applicable) Steps to reproduce the behavior:

  1. Create new wineprefix
  2. Install dotnet desktop 5 in the wine prefix via the Windows x64 installer.
  3. Install d3dcompiler_43 and DXVK1103 from winetricks.
  4. Run SA Tools Hub using Wine
  5. Open an SADX project
  6. Open a model or level
  7. Ensure textures are enabled

Expected behavior SALVL and SAMDL properly render 3D models with textures applied.

Screenshots Screenshot_20221218_233356 Screenshot_20221218_233952

Additional context This is a problem reported while running the program under Wine on Linux. It is understandable if the devs do not want to tackle this, but it might be interesting to know for potential Linux users.

PiKeyAr commented 1 year ago

Are you actually loading textures? The SALVL screenshot looks like an .salvl file was opened outside Project Mode. When you load levels and models manually, you also have to load textures manually.

coderman64 commented 1 year ago

Ah, you're right. User error. Sorry about that. Screen refresh issue can still be a thing sometimes, but I can work around that. It's kinda hard to tell what's a bug when you have to do so much to get it working in Wine in the first place, but that's just how it goes. I'll probably just post in the Discord next time instead of raising an issue.

PiKeyAr commented 1 year ago

I suspect the refresh issue is related to the window procedure hook (suppresses WM_UPDATEUISTATE) that I added a while back to reduce flickering on Windows. I've removed the hook since it's not a good solution to deal with flickering anyway. If the issue still persists, it's probably something with Wine.