Skip to content

colorspace: split PL_ALPHA_NONE off from PL_ALPHA_UNKNOWN

Niklas Haas requested to merge haasn/libplacebo:alpha_none into master

This field was doing double duty between marking the alpha mode as unknown and marking the alpha channel as absent, with inconsistent results. In particular, pl_renderer always inferred the alpha channel if present in the texture, leaving users with no options for easily manually disabling it.

This patch adds PL_ALPHA_NONE to rectify the situation, allowing API users to set target.repr.alpha = PL_ALPHA_NONE to explicitly disable alpha blending even when the target supports it.

See-Also: !637 (closed)

Merge request reports