mirror of
https://gitlab.freedesktop.org/wlroots/wlroots.git
synced 2026-03-10 05:34:08 -04:00
render/vulkan: add luminance multipler for output shader
This commit is contained in:
parent
b482e9089b
commit
7b6eec530c
3 changed files with 16 additions and 0 deletions
|
|
@ -10,6 +10,7 @@ layout(location = 0) out vec4 out_color;
|
|||
/* struct wlr_vk_frag_output_pcr_data */
|
||||
layout(push_constant, row_major) uniform UBO {
|
||||
layout(offset = 80) mat4 matrix;
|
||||
float luminance_multiplier;
|
||||
float lut_3d_offset;
|
||||
float lut_3d_scale;
|
||||
} data;
|
||||
|
|
@ -56,6 +57,8 @@ void main() {
|
|||
rgb = in_color.rgb / alpha;
|
||||
}
|
||||
|
||||
rgb *= data.luminance_multiplier;
|
||||
|
||||
rgb = mat3(data.matrix) * rgb;
|
||||
|
||||
if (OUTPUT_TRANSFORM == OUTPUT_TRANSFORM_LUT_3D) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue