[1.21.1/1.21.3/1.21.4 Bug] Custom lightmaps break certain vanilla shaders
Description of Issue
In 1.21.1, 1.21.3, and the 1.21.4 previews, the presence of custom lightmaps in a resource pack breaks the functionality of certain vanilla shaders. In my specific example, my pack has custom lightmaps in addition to a vanilla shader that changes the base color of leather armor. Having the lightmap in the same pack as the leather armor color vanilla shader causes all items affected by the shader (in this case, that is leather cap/tunic/pants/boots/horse armor) to render invisible in the inventory.
OptiFine Version
OptiFine 1.21.1_HD_U_J1, OptiFine 1.21.3_HD_U_J2, OptiFine 1.21.4_HD_U_J3_pre5, OptiFine 1.21.4_HD_U_J3, OptiFine 1.21.4_HD_U_J4_pre1
Screenshots
Correct visibility (custom colors off, disabling lightmaps):
Incorrect visibility (custom colors on, enabling lightmaps):