[1.21.3/1.21.4 Bug] Darkness effect is made pitch black by custom lightmaps specifically in dark areas
Description of Issue
The darkness effect is far stronger than it should be in dark areas when using a resource pack with a custom lightmap, regardless of what the lightmap actually does. It renders darkness as near-fully pitch black. Also affects 1.21.1.
OptiFine Version
OptiFine 1.21.1_HD_U_J1, OptiFine 1.21.3_HD_U_J2_pre9, OptiFine 1.21.3_HD_U_J2, OptiFine 1.21.4_HD_U_J3_pre1, OptiFine 1.21.4_HD_U_J3, OptiFine 1.21.4_HD_U_J4_pre1
Screenshots
No custom lightmap (correct):
With custom lightmap (incorrect):
Works for me, tested on pre11 with NewDefault++.
The bug does not appear in full brightness, for example in your screenshot you're on the surface at day time. The darkness effect is made overly dark specifically in dark lighting, seemingly stacking with the normal darkness.
In OptiFine 1.21.4_HD_U_J3 & OptiFine 1.21.4_HD_U_J4_pre1.
In preview_OptiFine_1.21.6_HD_U_J6_pre1.
In OptiFine 1.21.10_HD_U_J7_pre3