Loading SPIR-V Vulkan shaders in a Fabric mod (VulkanMod) #187753
-
|
Hi everyone 👋 What I’m trying to doI want to load precompiled SPIR-V shaders ( The shaders compile correctly using Expected behavior
Actual behavior
This happens even though:
Environment
Relevant code (simplified)ByteBuffer spirv = loadShader("shaders/world0/terrain.vert.spv");
VkShaderModuleCreateInfo createInfo =
VkShaderModuleCreateInfo.calloc()
.sType(VK_STRUCTURE_TYPE_SHADER_MODULE_CREATE_INFO)
.pCode(spirv);
LongBuffer pShaderModule = memAllocLong(1);
int result = vkCreateShaderModule(device, createInfo, null, pShaderModule);The What I’ve tried so far
Questions
GoalI’m aiming to build a modern, Vulkan-native shader ecosystem for Minecraft, with:
Any insights, examples, or pointers to existing implementations would be hugely appreciated 🙏 Thanks in advance! Guidelines
|
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
“Does VulkanMod impose pipeline layout or shader interface requirements that differ from standard Vulkan?”Yes — indirectly. In practice, this means your SPIR-V can be perfectly valid Vulkan, yet still fail inside VulkanMod. 🧠 The Core Issue: You’re Not the Vulkan “Owner”In a normal Vulkan application:
In VulkanMod:
This is the key mental shift.
|
Beta Was this translation helpful? Give feedback.
-
|
****iigknb_ v[repg.hklho ,f.,hoty te,fjeejhet t r r r r r r i0ijok4oooo4jjkdnhmsv se3oo43q0iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii-;llllllllllllllllllllllllllllllllllllllllllllll jrhrj_ |
Beta Was this translation helpful? Give feedback.
“Does VulkanMod impose pipeline layout or shader interface requirements that differ from standard Vulkan?”
Yes — indirectly.
VulkanMod does not invent a new Vulkan specification, but it operates inside Minecraft’s existing rendering architecture, which imposes constraints that standard standalone Vulkan apps do not have.
In practice, this means your SPIR-V can be perfectly valid Vulkan, yet still fail inside VulkanMod.
🧠 The Core Issue: You’re Not the Vulkan “Owner”
In a normal Vulkan application:
In VulkanMod: