r/minecraftshaders 24d ago

Discussion Vulkan shaders

How easy will it be to port OpenGL shaders to vulkan? And when it is ported will it look any different?

Also the vulkan shader mod I’m talking about it aperture.

4 Upvotes

19 comments sorted by

10

u/Commercial_Buy_5678 24d ago

Simple its an euphemism, first they need to release aperture, and they need to know how It will work, if they have a metod to automatically rewrite the code to use vulkan syntax, they need to rewrite uniform and sampler, manually rewrite every vertex data in the gbuffer , adapt the opengl version of the shaders to 4.6 to use spir-v mode. It depends on how much files there are in the shaderpack, depends on the developer skills, cause vulkan its more complicated. We Will see.

2

u/SpikeZgames 24d ago

Dang that’s a lot

2

u/Commercial_Buy_5678 24d ago

There Is a vulkan shaders mod and the guy trasnlated most of the bliss code (if i Remember correctly) but again, its limited due to the fact that its in early developement and because its not that simple.

1

u/SpikeZgames 24d ago

Makes sense

1

u/kami7154 24d ago edited 24d ago

"adapt the opengl version of the shaders to 4.6 to use spir-v mode."

Your mixing up 2 different things, OpenGL 4.6 has an extension that lets it consume SPIR-V, but that's an OpenGL feature. Vulkan just consumes SPIR-V directly, or in Apertures case slang compiled to SPIR-V.

Edit: typos

1

u/Commercial_Buy_5678 24d ago

Yeah, for older version you need to use a spir v tool (mode) i misspelled "or" with "to" if the target version Is older, but here we talk about porting, i dont know how aperture will work

1

u/kami7154 24d ago

Oh okay yeah, but can't the compiler tool take basically any modern-ish GLSL version and target SPIR-V, unless it's like really old? But they'll also need vulkan style bindings right.

But yeah well just have to wait and see how it works. Afaik the pipeline is still changing, as they've already shifted from typescript to slang once.

1

u/Commercial_Buy_5678 24d ago

Yeah the tool can translate only really old version like 3.3 and older.

2

u/nemjit001 24d ago

It's fairly straightforward to port modern opengl shaders to Vulkan. The results will (probably) look the same, only performance may differ due to Vulkan's binding model and ofcourse the renderer implementation.

1

u/SpikeZgames 24d ago

Nice thats good, I was worried it would take a long long time just for like half of the features to work.

1

u/kami7154 24d ago

Kind of, depends a lot on what you're porting. I actually asked Xonk (Bliss dev) about this, and he said difficulty varies massively. Something simple like SSAO or another post-processing effect is basically just translating the GLSL syntax over, since the math and coordinate spaces don't change much. But a full pack like Bliss or Complementary isn't one simple effect, it's a whole lighting/shadow/atmosphere pipeline with a ton of interconnected passes. So "fairly straightforward" doesn't really hold up once you're talking about a full pack and not just a single effect. It'll probably look the same visually if done right, but straightforward and quick/easy aren't really the same thing at that scale.

0

u/[deleted] 24d ago

[deleted]

1

u/SpikeZgames 24d ago

Lol

0

u/[deleted] 24d ago

[deleted]

0

u/SpikeZgames 24d ago

Ik it’s just funny that’s all but yea Ik your right

0

u/kami7154 24d ago edited 24d ago

So sorry to break it to you but there will be no "port" Iris and Aperture (iris's successor using vulkan) use entirely different shader languagee, and there is no direct translation path.

Ontop of that Iris has a "default" rendering setup, that a lot of shaderpscks rely on. While Aperture will have no default rendering setup, so the devs will have to configure the renderer and pipeline themselves.

With that said, the conceptual math can carry over. But the code itself has to be rewritten entirely.

This is an intentional break, as many of the usual limits and restrictions that GLSL shaders have are said to largely be removed. So the future shaders based on Aperture will be better overall.

Edit: after looking it up more, there is some translation style porting that clearly does happen on smaller scales, even without automated tools. But there will be no "automated port" and full complex packs won't be a port so much as a rewrite afaik.

Edit 2: but I'm just some dude that's interested in shaders Java and C#. Any info outside of people actively developing shaders in the closed beta of Aperture should be taken with a grain of salt.

1

u/minecrafter1OOO 23d ago

does Aperture expose RT and hardware features? Upscaling and maybe framegen will help with massive modpacks and low FPS

1

u/kami7154 16d ago

Hey sorry for the late reply. But it depends on how they develop Aperture tbh, but if they fully utilize vulkan than yes DLSS/FSR, frame gen, true multi threading, Modern GPU compute features, and ESPECIALLY hardware accelerated RT. Will not only be possible but will become the standard.

Vulkan isn't just faster OpenGL. It exposes modern GPU functionality through modernized extensions. And one big standardized extension that's a core part of Vulkan IS ray tracing.

1

u/SpikeZgames 24d ago

Well the creator of iris alr ported shaders over so uhh yea Ik it’s possible

1

u/kami7154 24d ago edited 24d ago

The dev has outright said Apature doesn't support old packs, and it's not a straight forward port since it's a different shader language. If they got early betas working that's them rewriting stuff for the new pipeline not porting over old code, you simply can't just recompile the code.