mirror of
https://gitlab.freedesktop.org/wlroots/wlroots.git
synced 2025-11-02 09:01:38 -05:00
render/vulkan: add luminance multiplier for texture shader
This commit is contained in:
parent
fa1feb447f
commit
ae85c31176
3 changed files with 14 additions and 0 deletions
|
|
@ -9,6 +9,7 @@ layout(location = 0) out vec4 out_color;
|
|||
layout(push_constant, row_major) uniform UBO {
|
||||
layout(offset = 80) mat4 matrix;
|
||||
float alpha;
|
||||
float luminance_multiplier;
|
||||
} data;
|
||||
|
||||
layout (constant_id = 0) const int TEXTURE_TRANSFORM = 0;
|
||||
|
|
@ -61,6 +62,8 @@ void main() {
|
|||
rgb = pq_color_to_linear(rgb);
|
||||
}
|
||||
|
||||
rgb *= data.luminance_multiplier;
|
||||
|
||||
rgb = mat3(data.matrix) * rgb;
|
||||
|
||||
// Back to pre-multiplied alpha
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue