In a shader post json file, if a shader pass provides an invalid value in the uniforms, upon fixing the issue, the shader will stop updating no matter how many reloads are done, and will instead always render the same version of the shader from the reload before the error happened.
It seems there are other cases that can trigger this bug to occur, all triggered by certain errors in the shader, but I do not have a conclusive list of exact scenarios. One possible case includes changing the shader to one of a different GLSL version with code that contains a bug. The other cases always happen when reloading after fixing an error after a previous reload.
The game should always reliable reload all resource pack assets including recompiling modified shaders.
- Download the provided zip file and extract the contents to your resource pack folder.
- Open a world, set graphics to Fabulous! and load the resource pack.
- You should see that your screen is completely red now. This means the shader is being applied.
- Go to assets/minecraft/shaders/post. Rename transparency.json to transparencyTEMP.json, then rename transparencyERROR.json to transparency.json (effectively swapping the files).
- F3+T to reload resource packs, and the game will error and reset to the default shaders as expected. The new transparency.json passes a non-existent Uniform value called 'Example' to the shader at line 69. In the output log, you should be able to find an error saying "passes->uniforms: Uniform 'Example' does not exist".
- Now rename transparency.json to transparencyERROR.json, then rename transparencyTEMP.json to transparency.json (effectively swapping the files again).
- Set graphics back to Fabulous! and load the resource pack.
- You should see that your screen is red again. This means the shader is loaded.
- Go to assets/minecraft/shaders/program. Open shaderreloadbug.fsh and uncomment the second line. This should now make the shader render a blue screen instead of red.
- F3+T to reload resource packs, and you will see the screen is still red. No amount of reloads will update the shader.
- Restart the game, go back into the world, and you will now see the screen is blue, confirming that the shader previously was refusing to update.
A restart can be avoided by deleting the pass, reloading, and putting the pass back again, but this is not an optimal way around the issue. The game should always reliably reload all resources.