适用于 Minecraft 原生 Vulkan 渲染器的 OptiFine 格式光影包
Minecraft 现已随附原生 Vulkan 渲染器,与原有的 OpenGL 渲染器并存。现有的所有光影包均为 OpenGL 编写,无法在 Vulkan 上运行。
Vitrail 仍能直接运行它们,无需修改。 它会从 shaderpacks/ 目录读取 OptiFine 格式的光影包,在加载时对其 GLSL 代码进行一次转换,然后交由游戏内置的编译器处理。绘制每一帧时不会进行任何实时转换。
这个项目最初源于一个疑问:过去十余年间为 OpenGL 编写的光影包,能否在当前游戏自带的渲染器上无缝运行?它作为一个人的业余项目,自七月起每日都在开发。随后有贡献者加入,目前仍处于早期阶段:其运行的后端被游戏本身标记为实验性功能。
它的构建方式符合当今许多软件的开发模式,否则可能根本不存在:AI 工具承担了大部分编码和调试工作,而人类开发者决定构建什么、使用真实光影包和 Iris 进行测试,并为每个错误承担责任。项目中从 Iris 和 Kroppeb 的 stareval 获取的代码已按文件在 NOTICE 文件中注明,并遵循相同的许可证。如果你在意这些细节,现在你知道了。如果这个模组有用,下方有咖啡赞助链接;问题反馈 是我回复的地方。
安装前须知:这是一个测试版
- Vulkan 后端是实验性的,由游戏本身标记:你需要开启的设置名为“优先 Vulkan(实验性)”。
- 整个场景都会经过你的光影包处理:地形、水面、阴影、天空、云层、天气、粒子、生物、方块实体、手持物品、名称标签和告示牌。目前仍由游戏引擎直接渲染的部分会在日志中首次绘制时显示引擎名称,且这一列表会随着版本发布逐渐缩短。
- 部分光影包在某些地方仍然显示不正确,错误的画面比缺失更糟。实际测试过的光影包表格 从你看到的现象开始,并说明了原因。
- 如果你今天想要的是完整的画面效果,请在 OpenGL 后端上使用 Iris。 它能很好地完成这项工作,并且是本引擎逐帧对比的参考标准。
自带光影包
Vitrail 是引擎,不是光影包本身,因此它不提供任何光影包:光影包属于其作者,其许可证不允许重新分发。以下是它能渲染的最知名光影包。
实际测试过的光影包表格 中的其他所有光影包也能正常渲染,表格中还列出了每个光影包与 Iris 效果的接近程度。未列入表格的光影包表示我尚未加载过,而非不受支持。
安装后
- 将游戏切换至 Vulkan 并重启。 视频设置,“优先 Vulkan(实验性)”。后端在游戏启动时确定,因此需在下次启动时生效。
- 使用
I 键选择你的光影包。 这将打开光影包选择界面,R 键可从磁盘重新读取光影包,K 键可关闭并重新开启光影。这三个按键均可在游戏的控制设置中 Vitrail 选项下进行重绑定。
- 如果帧率不足,有一个滑块可供调整。 视频设置,在 Vitrail 专属页面,“渲染比例”:场景以窗口大小的 25% 到 100% 进行渲染,并在界面之前恢复至全尺寸,因此无论比例如何,菜单、聊天和 F3 屏幕都保持清晰。
- Distant Horizons 兼容,你的光影包自带的 DH 程序会渲染其远景地形。在 Fabric 上,像安装其他模组一样安装即可。在 NeoForge 上,其当前正式版在 Vulkan 渲染器上仍会崩溃(由其自身的纹理解包器引起,非本模组),因此请手动安装
此构建版本。
- 不需要 Chloride,如果你运行它,其中有五项设置决定了哪些内容能传递给你的光影包:性能页面上的“快速箱子”和“快速床”,实体页面上的“最大实体距离”、“最大怪物距离”和“最大方块实体距离”。Vitrail 会在启动时的日志中列出任何检测到的相关设置。
仅客户端可用,提供一个 jar 文件,同时支持 Fabric 和 NeoForge。Iris 可与本模组共存,安装在 Iris 所需的 Sodium 版本上,Vitrail 同样运行于该版本之上:在 Vulkan 下 Vitrail 负责渲染,在 OpenGL 下 Iris 负责渲染,在视频设置中切换后端即切换引擎。
安装指南
包含其余信息。
链接与致谢
如果某个光影包或模组与 Vitrail 不兼容,请提交一个
问题反馈。 画面渲染错误、模组冲突、崩溃:每份报告都有帮助,如果你想参与贡献,非常欢迎提交拉取请求。
来源:今日整合包的内容、更新日志以及完整的兼容性说明均位于 Vitrail-Shaders。该光影也发布在 CurseForge 上。
采用 LGPL-3.0-only 许可证。整合包加载器与数值目录的部分代码改编自 Iris,后者同样采用 LGPL-3.0 许可证;表达式语法则基于 Kroppeb 的 stareval。具体哪些部分被借用以及在开发过程中进行了哪些修改,已在项目的 NOTICE 文件中逐文件记录。
OptiFine-format shader packs, on Minecraft's native Vulkan renderer
Minecraft now ships a native Vulkan renderer alongside the OpenGL one. Every
shader pack that exists was written for OpenGL, and none of them run on it.
Vitrail runs them anyway, unmodified. It reads an OptiFine-format pack out
of shaderpacks/, translates its GLSL once when the pack loads, and hands it to
the compiler the game already embeds. Nothing translates while a frame is drawn.
It started as a question, whether packs written for OpenGL over more than a
decade could run untouched on the renderer that now ships with the game, and
as one person's side project, worked on every day since July. Contributors
have joined along the way, and it is still an early one: the backend it runs
on is marked experimental by the game itself.
It is built the way a lot of software gets built now, and it would not exist
otherwise: AI tools do most of the typing and the debugging, and a human
decides what gets built, tests it against real packs and against Iris, and
carries the blame for every bug. What
was taken from Iris and from Kroppeb's stareval is credited file by file in
the project's NOTICE, under the same licence. If any of that matters to you,
now you know. If the mod is useful, there is a coffee link below, and the
issues are where I answer.
Before you install: it is a beta
- The Vulkan backend is experimental, marked so by the game itself: the
setting you have to turn on reads "Prefer Vulkan (Experimental)".
- The world goes through your pack: terrain, water, shadows, sky, clouds,
weather, particles, mobs, block entities, the held hand, name plates and
signs. What still comes from the game, the engine names in its log when a
place first draws, and that list shrinks release by release.
- Some packs still come out wrong in places, and a wrong picture is worse
than a missing one. The table of packs actually tried starts from
what you see and names the cause.
- If what you want today is a finished picture, use Iris on the
OpenGL backend instead. It does that job well, and it is the reference this
engine is checked against, frame against frame.
Bring your own pack
Vitrail is the engine, not the pack, and it can ship none: the packs belong to
their authors and their licences do not allow redistribution. These are the
best known of the packs it draws.
Every other pack in the table of packs actually tried draws as well,
and the table says how close each one comes to Iris. A pack absent from it is
one I have not loaded, not one that is unsupported.
After you install
- Switch the game to Vulkan and restart it. Video Settings, "Prefer Vulkan
(Experimental)". The backend is picked when the game boots, so it takes effect
on the next launch.
- Pick your pack with
I. It opens the shader pack screen, R reads the
pack again from disk and K turns shaders off and back on. All three can
be rebound in the game's controls, under Vitrail.
- If the frame rate comes up short, there is a slider for it. Video
Settings, on Vitrail's own page, "Render Scale": the world is drawn at 25 to
100 percent of the window and brought back to full size before the interface,
so menus, chat and the F3 screen stay sharp whatever the scale.
- Distant Horizons is compatible, and your pack's own DH programs draw its
far terrain. On Fabric, install it like any other mod. On NeoForge its current
release still crashes on the Vulkan renderer (its own texture unwrapper, not
this mod), so install
this build
by hand instead.
- Chloride is not needed, and if you run it, five of its settings decide
what reaches your pack: Fast Chests and Fast Beds on the Performance page,
Max Entity Distance, Max Monster Distance and Max Block Entity Distance on
the Entities page. Vitrail names in the log at startup any it finds on.
Client only, one jar for Fabric and NeoForge. Iris can stay installed beside it,
on the Sodium version Iris asks for, which Vitrail runs on too: on Vulkan Vitrail
draws, on OpenGL Iris does, and switching the backend in the video settings
switches engines.
The install guide
has the rest.
Links and credits
If a pack or a mod does not work with Vitrail, please open an
issue. A pack that draws
wrong, a mod that clashes, a crash: every report helps, and if you want to take
part, pull requests are very welcome.
Source, what goes through a pack today, the changelog and the full
compatibility notes are all at
Vitrail-Shaders. It is also on
CurseForge.
LGPL-3.0-only. Parts of the pack loader and of the value catalogue are adapted
from Iris, which is LGPL-3.0 as well, and
the expression grammar is Kroppeb's stareval. What was taken and what was
changed on the way is recorded file by file in the project's NOTICE.
评论 0
登录后参与评分
还没有评论,来抢沙发吧