mojira.dev
MCPE-40059

Adding a "varying" variable to a shader pipeline makes it unloadable

Not sure if this is a valid issue, but there is a problem in the shader loading code in 1.8.0. This is a regression from 1.7.x.

When you add a single "varying" variable to a shader pipeline, the game takes an extremely long time, usually several tens of minutes, to load it. The attached resource pack has a customized renderchunk.vertex and renderchunk.fragment whose only change is an extra dummy variable varying vec4 theProblem.

While the issue doesn't affect the vanilla game play, it severely reduces the potential of custom shaders (because you can have no more communication channels between shader stages). And I suspect this is only a problem came up to the surface whose root cause is something worse.

Steps to reproduce:

  1. Import the attached addon broken-shader-1.8.0.mcpack.

  2. Enable it in "Global Resources".

  3. Observe that the game freezes for a while.

I have also attached a diff file to show that the change should be harmless.

Linked issues

Attachments

Comments 2

Additional info:

I found you could work around this issue by adding your own symbol to $.materials.terrain_base.+defines in terrain.material and putting your additional "varying" variable in a #ifdef block. This suggests something like a linkage error (duplicate symbols) in renderchunk.* but I really have no clue why this works.

Cleaning up old tickets: This ticket has not been updated recently (~1 year+) so is being closed as Cannot Reproduce. If you feel this is still a valid issue then please comment, or create a new ticket following the Issue Guidelines.

Quick Links:
📓 Issue Guidelines – 💬 Mojang Support – 📧 Suggestions – 📖 Minecraft Wiki

PHO

(Unassigned)

165734

Confirmed

Tablet - iOS - iPad Pro

iOS 12.1.1

1.8.0

Retrieved