Repository: godot
Issue: Light2D Blend Mode Mix result for both Energy < 1 or > 1 is incorrect (Min, Max or darker), asymmetrical and indeterministic, depends on node creation order and runtime result may differ from editor
Labels: bug,topic:rendering,topic:2d

### Godot version

v4.0.2.stable.official [7a0977ce2]

### System information

Linux Ubuntu 22.04 with Unity desktop

### Issue description

This happens on both Godot 3 and Godot 4 with nuances due to some things being fixed, some bugs being added, but the overall issue is the same.

Versions tested: Godot 3.5.2 & Godot 4.0.2

Light2D Mix Blend Mode is supposed to apply a linear average on all lights, which is an associative operation. Instead, it gives:
- for Energy > 1, Min or Max i.e. it picks the lowest or highest Energy, depending on the order in which you added the Light2D nodes, the result in the intersection area will differ. In Godot 3, when playing the game, runtime result can even differ from editor preview (as nodes may be recreated in a different order).
- for Energy < 1, intersection is darker, and not an average 
- for one Energy < 1 and one Energy > 1, we get something that looks like an average (didn't check exact color but it's the only case where the final light _looks_ correct)

Real game example:

![image](https://github.com/godotengine/godot/assets/1067772/490d2263-e6c3-4da2-a8b8-eec6a1e17732)

Above, each torch has a light disc with weak energy. Note how only the top-right torch light (also in Mix blend mode) "blocks" the central fire light (in this case, result at the intersection is Min light). It's not deterministic, sometimes the upper torches will block, sometimes all of them.

MRP examples:

Godot 3, editor:
![image](https://github.com/godotengine/godot/assets/1067772/fa15a413-31d1-44b4-9eca-7eaab9191ac2)

There is Min or Max, but no real linear average.

Godot 3, runtime:
![image](https://github.com/godotengine/godot/assets/1067772/e1e57593-776b-47ec-ac0f-ac286fa16745)

Note how the bottom-left results changed slightly

Godot 4, editor:

![image](https://github.com/godotengine/godot/assets/1067772/97c7d31e-c8ea-4aa4-811a-6a4322dfa65e)

Because of known issue https://github.com/godotengine/godot/issues/8685, the number of lights displaying is limited, so I had to use a small rectangle background and move it around the scene to display fewer lights group by group:

![image](https://github.com/godotengine/godot/assets/1067772/3c052483-c6e1-497d-94ab-bb2ba43ef225)

![image](https://github.com/godotengine/godot/assets/1067772/7021ecc3-4f8c-40fb-b7f8-34764453481c)

![image](https://github.com/godotengine/godot/assets/1067772/21487c18-5d53-492f-ae53-7a79894531b0)

Godot 4, runtime:

No change observed this time. Maybe the node creation order has been stabilized. But in a real game where you spawn lights in an order that depends on the player, same issues may arise.



### Steps to reproduce

1. Open MRP to benefit from a set of lights in Blend Mode at different energy levels (scene is DemoBugLight2DMix.tscn)
2. Observe in particular the symmetrical lights such as 1.3 & 1.7 or 0.2 & 0.8 and how they work differently based on the order
3. Try to reorder the nodes in the tree, or their Z index: no effect. Only creating new nodes can change the final result. You can play by duplicating or adding new lights and see the different results possible.

Bonus: if you don't like the disc with gradient, replace sprites with disc_100x100.png which is a clean disc without gradient.

### Minimal reproduction project

Godot 3: [v3.5.2 - Light2D Mix Blending Mode asymmetry.zip](https://github.com/godotengine/godot/files/11655454/v3.5.2.-.Light2D.Mix.Blending.Mode.asymmetry.zip)

Godot 4: [v4.0.2 from v3.5.2 - Light2D Mix Blending Mode asymmetry.zip](https://github.com/godotengine/godot/files/11655458/v4.0.2.from.v3.5.2.-.Light2D.Mix.Blending.Mode.asymmetry.zip)