Maybe meaningless physically (the usual "coverage" model used to think about alpha channels doesn't really seem to apply to glare...), but it seems useful in practice
- Retains input channel where no glare is added
- Added glare increases the alpha channel in proportion to the intensity of the glare... glare "beyond 1" makes the image fully opaque. This will probably result in odd effects if the target image is a HDR format, because adjusting the intensity of the resulting image may result in the opacity being oddly out-of-sync with the brightness. [So this mainly makes sense for LDR image output.]
The main problems encountered in trying to implement this:
- Our framework for passing around alpha-values is kind of creaky. E.g. there's no predefined image type for images-with-alpha (in practice, just using
TupleMatrixData<> instead of Image actually works fine, but it'd be nice to clean this up more).
- Because color [intensity] and alpha are different types of value, there are problems with just naively copying one to the other. In particular, because some image formats gamma-correct the color channels but not the alpha channel, just doing the "obvious" thing in our linear internal space doesn't actually have the desired effect in the final image... ...Fill in details...
Still, seems doable.
Maybe meaningless physically (the usual "coverage" model used to think about alpha channels doesn't really seem to apply to glare...), but it seems useful in practice
The main problems encountered in trying to implement this:
TupleMatrixData<>instead ofImageactually works fine, but it'd be nice to clean this up more).Still, seems doable.