Skip to content

[Crash] Game freezes on startup when using resource packs that modify item_entity_translucent_cull.fsh (undeclared identifier 'lightColor') #859

Description

@Asosk04

Describe the bug

When launching Minecraft with VulkanMod and certain resource packs enabled (specifically those that overhaul 3D item models, such as Torches Reimagined or Fresh Buckets), the game freezes during the loading screen.

Checking the logs reveals a fatal shader compilation error in VulkanMod's renderer: error: 'lightColor' : undeclared identifier

Because of this crash, Minecraft forcefully unloads all resource packs as a safety fallback. When reopening the game, it loads successfully but with all resource packs completely disabled. The crash is caused by these resource packs modifying the core shader item_entity_translucent_cull.fsh and expecting a lightColor uniform, which VulkanMod's custom pipeline does not seem to provide or support overriding.

Steps to reproduce

  1. Install VulkanMod (tested on v0.6.8+1.21.11).
  2. Install and enable a resource pack that modifies assets/minecraft/shaders/core/item_entity_translucent_cull.fsh (e.g., Torches Reimagined, Fresh Buckets, Better Fresher 3D Books, or Bray's Bow & Arrows).
  3. Attempt to launch the game (or reload resource packs in-game via F3+T).
  4. The game will freeze on the loading screen and crash the rendering pipeline, eventually leading to all resource packs being forcefully unloaded.

Log files

https://mclo.gs/yexpiIM

	pipeline/item_entity_translucent_cull.fsh:99: error: 'lightColor' : undeclared identifier

[Render thread/INFO]: [STDERR]: 	at knot//net.vulkanmod.vulkan.shader.SPIRVUtils.compileShader(SPIRVUtils.java:88)
[Render thread/INFO]: [STDERR]: 	at knot//net.vulkanmod.vulkan.shader.GraphicsPipeline.createShaderModules(GraphicsPipeline.java:231)
[Render thread/INFO]: [STDERR]: 	at knot//net.vulkanmod.vulkan.shader.GraphicsPipeline.<init>(GraphicsPipeline.java:45)
[Render thread/INFO]: [STDERR]: 	at knot//net.vulkanmod.vulkan.shader.Pipeline$Builder.createGraphicsPipeline(Pipeline.java:407)
[Render thread/INFO]: [STDERR]: 	at knot//net.vulkanmod.render.engine.VkGpuDevice.compilePipeline(VkGpuDevice.java:391)
[Render thread/INFO]: [STDERR]: 	at knot//net.vulkanmod.render.engine.VkGpuDevice.precompilePipeline(VkGpuDevice.java:306)
[Render thread/INFO]: [STDERR]: 	at knot//net.minecraft.class_10151.method_62945(class_10151.java:153)
...
[Render thread/INFO]: Caught error loading resourcepacks, removing all selected resourcepacks
java.util.concurrent.CompletionException: java.lang.RuntimeException: Caught exception compiling pipeline: minecraft:pipeline/item_entity_translucent_cull
	at java.base/java.util.concurrent.CompletableFuture.encodeThrowable(Unknown Source)
	at java.base/java.util.concurrent.CompletableFuture.completeThrowable(Unknown Source)
	at java.base/java.util.concurrent.CompletableFuture$UniAccept.tryFire(Unknown Source)```

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions