Material samplers don't reload on pipeline change
spiralhalo opened this issue ยท 1 comments
This issue is first discovered by heyman on May 23 although back then the cause or its reproducibility was unknown.
Now I have a hypothesis on the cause. It seems that these lines of code are evaluated once and not re-evaluated on pipeline reload.
How to test this issue: use Canvas standard pipeline before loading any world. Then after loading a world, switch to Lumi Lights (latest commit) and set "Enchantment glint mode" to "Glint Texture". Notice glitch on enchanted items in the inventory GUI and hotbar.
The current workaround for this issue is restarting minecraft after changing pipelines.
p.s. For anyone out of the loop, I am responsible for the quoted code and I will PR a fix later. Opening this issue in case Grondag finds it trivial to fix it himself.
So there is already a reload function:
I don't know how to invalidate/remove existing uniforms. Should we just make the existing programs null on reload or is there any reason to only create the material programs once?