File: cmyk_rhi.frag

package info (click to toggle)
qtdeclarative-opensource-src 5.15.8%2Bdfsg-3
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 259,256 kB
  • sloc: javascript: 512,396; cpp: 495,775; xml: 8,892; python: 3,304; ansic: 2,764; sh: 206; makefile: 62; php: 27
file content (18 lines) | stat: -rw-r--r-- 602 bytes parent folder | download | duplicates (11)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#version 440

layout(location = 0) in vec2 qt_TexCoord0;
layout(location = 0) out vec4 fragColor;

layout(binding = 1) uniform sampler2D cyan;
layout(binding = 2) uniform sampler2D magenta;
layout(binding = 3) uniform sampler2D yellow;
layout(binding = 4) uniform sampler2D black;

void main() {
    vec2 t = qt_TexCoord0 * 3. - 1.;
    lowp float c = texture(cyan, t + vec2(.05, .09)).a;
    lowp float m = texture(magenta, t + vec2(.04, -.10)).a;
    lowp float y = texture(yellow, t + vec2(-.10, .01)).a;
    lowp float k = texture(black, t).a;
    fragColor = 1. - vec4(c + k, m + k, y + k, 0.);
}