Debian Codegraph @

tests/manual/nodetypes_ng/shadow_pass1.frag

raw
1 #version 440
2
3 layout(location = 0) in vec2 qt_TexCoord0;
4 layout(location = 0) out vec4 fragColor;
5
6 layout(binding = 1) uniform sampler2D source;
7
8 layout(std140, binding = 0) uniform buf {
9 // The built-in vertex shader assumes the first 68 bytes are matrix and
10 // opacity so have them there even though the matrix is not used here.
11 mat4 qt_Matrix;
12 float qt_Opacity;
13 vec2 delta;
14 } ubuf;
15
16 void main()
17 {
18 fragColor = (0.0538 * texture(source, qt_TexCoord0 - 3.182 * ubuf.delta)
19 + 0.3229 * texture(source, qt_TexCoord0 - 1.364 * ubuf.delta)
20 + 0.2466 * texture(source, qt_TexCoord0)
21 + 0.3229 * texture(source, qt_TexCoord0 + 1.364 * ubuf.delta)
22 + 0.0538 * texture(source, qt_TexCoord0 + 3.182 * ubuf.delta)) * ubuf.qt_Opacity;
23 }