Closed mike391 closed 5 years ago
The confusion comes from an error on my part, apparently I did not commit a premultiply step into bars
and graph
, which should be there.
Ideally you have the following stage (2.frag
) for the bars
module:
#if USE_ALPHA == 0
#error __disablestage
#endif
#include ":util/premultiply.frag"
Where having USE_ALPHA
set to 1
ensures the premultiply step is included. This has a minor performance penalty, hence the option to explicitly enable it if transparency colors are defined in bars.glsl
.
As the comments suggest, this is only required for "native"
transparency since X11 due to how it handles transparency. The above stage is automatically disabled in any other transparency mode.
To actually set transparent colors, you only need to add transparent bits onto the end of colors in any module config, for example #FF000070
is a mostly transparent bright red. If the alpha bits are omitted, then they are assumed to be FF
(fully opaque). Alternatively, the final floating point value in a vec4
also corresponds to the alpha bits.
Since you pointed out the documentation being unclear from the comments/syntax, I added a section to the wiki: "Working with colors"
Wow thanks! That's extremely helpful.
How do I configure opacity on bars? There is no documentation that clearly states how to do this. There is
#define USE_ALPHA
but no clear indication of what values it takes and if thats what it does.I want to set the opacity of the bars mod so that my wallpaper shows through a bit, im on budgie if that matters.