The scanline implementation in crt-beans is also energy-preserving, but it uses an entirely different method than Lottes uses. The only limitation is that if you want to maintain scanline separation at full brightness, you basically turn down the brightness a bit (which it seems Lottes does as well with the 7/8 brightness limit). In crt-beans that is configurable, so you can have no brightness drop at all if you are ok with the scanlines merging at full brightness.
Actually, it is basically impossible to configure the scanlines in crt-beans to not be energy-preserving. You might be able to do it if you mess with the horizontal width after the filter pass (not applicable to the VGA preset) or if you set the parameters out of bounds. That was one of my goals during development.
The mask implementation in crt-beans is also energy-preserving on average. The unmasked scanlines get blended in when the mask gets saturated, in such a way that brightness is preserved. There is a big comment in the code explaining the math behind it. I say “energy-preserving on average” because you can lose some energy on detail finer than the mask, but that’s the case on a real CRT as well.
@ANK I hadn’t seen those videos before, thank you for sharing them!