Skip to content

Support alpha-channel in snogbloom utility #55

Description

@snogglethorpe

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

  1. Retains input channel where no glare is added
  2. 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:

  1. 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).
  2. 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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions