Skip to content

Unreal Engine 4 DXVK workaround 3

Latest
Compare
Choose a tag to compare
@nastys nastys released this 19 Mar 23:11
· 6 commits to ue4-dxvk-workaround-3 since this release

UE4 games running on macOS with DXVK and MoltenVK are normally rendered almost black, but you can sometimes see the edges of something being rendered. This happens because, presumably due to a bug, the "CombineLUTs" step generates a 32x32x32 3D texture with all "layers" black except the first one, resulting in a black frame after post-processing.
I have patched the shader to bypass the LUT for now. Of course, it doesn't render correctly, plus I'm patching the shaders in the worst way possible, so it slows down shader recompilation and may not even work for all games.
I'm hoping this proves that full support for geometry shaders is not required and that a (real) fix is possible.

If you use this patched version of MoltenVK with CrossOver, please do not ask CodeWeavers for support.

If you want to share this patch, please link back to this page.

Updated to support Kingdom Hearts 3 and Life is Strange 3.
Note that KH3 requires mf-install or mf-installcab (I don't remember which one), which is tricky to install in a CrossOver bottle.

Deprecated; if you're on macOS 14 Sonoma or later, use D3DMetal (GPTK) instead.

For Kingdom Hearts III and other games from Epic Games, install (and set up) Whisky and Heroic.
Install the game using Heroic and the following workaround for D3DMetal:
In the Wine tab, select Whisky - 2.3.2
In the Advanced tab, add the following Environment Variables:
CX_APPLEGPTK_LIBD3DSHARED_PATH = $HOME/Library/Application Support/com.isaacmarovitz.Whisky/Libraries/Wine/lib/external/libd3dshared.dylib
WINEDLLPATH_PREPEND = $HOME/Library/Application Support/com.isaacmarovitz.Whisky/Libraries/Wine/lib/wine
WINEDLLOVERRIDES = dxgi,d3d9,d3d10core,d3d11=b,mf,mfplat,mfreadwrite=n

For Retina mode:
Wine tab -> Run exe on prefix -> Select <prefix folder>/drive_c/Windows/regedit.exe
Open HKEY_CURRENT_USER\Software\Wine, right click on Wine, create a new key called Mac Driver, open it, and add a new string key called RetinaMode with value y.