赞
踩
使用CrossOver安装Steam,下载安装八方旅人。进入游戏后发现所有UI界面、地图等都能正常显示,但凡是2.5D的场景均不能正常显示,处于黑屏状态(如图所示)。
正常的UI界面
黑屏的2.5D场景,包括城镇和战斗场景
首先在CrossOver的论坛中看到确实存在CrossOver运行八方旅人时黑屏的问题[1]。该问题是由于八方旅人使用了多边形阴影,而这个Apple的Metal图形API不支持这个技术。
其次又看到了有人能够成功使用CrossOver运行八方旅人[2],其视频右侧有一个MoltenVK的开源项目[3]。
在Github上搜索得知这个项目是利用Metal对Vulkan的一个实现。
MoltenVK is a layered implementation of Vulkan 1.2 graphics and compute functionality, that is built on Apple's Metal graphics and compute framework on macOS, iOS, and tvOS. MoltenVK allows you to use Vulkan graphics and compute functionality to develop modern, cross-platform, high-performance graphical games and applications, and to run them across many platforms, including macOS, iOS, tvOS, Simulators, and Mac Catalyst on macOS 11.0+.
Metal uses a different shading language, the Metal Shading Language (MSL), than Vulkan, which uses SPIR-V. MoltenVK automatically converts your SPIR-V shaders to their MSL equivalents.
To provide Vulkan capability to the macOS, iOS, and tvOS platforms, MoltenVK uses Apple's publicly available API's, including Metal. MoltenVK does not use any private or undocumented API calls or features, so your app will be compatible with all standard distribution channels, including Apple's App Store.
使用方法是将编译好的libMoltenVK.dylib替换项目中原有的libMoltenVK.dylib。在这个项目的releases[4]里能够下载到最新的编译好的libMoltenVK.dylib。
在Crossover应用上右键 "显示包内容" 后,在如下路径中确实找到了libMoltenVK.dylib
/Applications/CrossOver.app/Contents/SharedSupport/CrossOver/lib64/
将原有的那个dylib备份后, 把下载下来的libMoltenVK.dylib拷贝进这个目录。再次启动CrossOver打开八方旅人,发现可以正常显示2.5D场景了。
正确渲染的2.5D场景,但是画面较为灰暗
由于CrossOver直接使用了Apple的Metal API,不能正常渲染使用多边形阴影技术的游戏,包括但不限于八方旅人。可以通过替换libMoltenVK动态库实现正确渲染。
不过替换动态库后渲染的画面较为灰暗,和那个视频中的情况一致,可能是这个动态库的缺陷,期待更新。正确设置分辨率后,可以接近60fps运行。
如果替换libMoltenVK动态库后发现还是黑屏,在游戏的图像设置界面将下面的渲染精度全部调成"高"即可正确渲染,笔者也发现设置为"中"或"低"时仍会出现黑屏。
我的设备及软件版本:
参考链接
[1] Black screen with HUD visible | 社区论坛 | CrossOver 技术支持 | CodeWeavers
[2] https://youtu.be/UbSfU6CAqTs
[4] Release Unreal Engine 4 DXVK workaround 3 · nastys/MoltenVK · GitHub
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。