render/vulkan: add luminance multipler for output shader

This commit is contained in:
Simon Ser 2025-02-27 18:36:15 +01:00
parent b482e9089b
commit 7b6eec530c
3 changed files with 16 additions and 0 deletions

View file

@ -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) {