Debian Codegraph @

drivers/gles3/shaders/feed.glsl

raw
1 /* clang-format off */
2 #[modes]
3
4 mode_default =
5
6 #[specializations]
7
8 USE_EXTERNAL_SAMPLER = false
9
10 #[vertex]
11
12 layout(location = 0) in vec2 vertex_attrib;
13
14 out vec2 uv_interp;
15
16
17 void main() {
18 uv_interp = vertex_attrib * 0.5 + 0.5;
19 gl_Position = vec4(vertex_attrib, 1.0, 1.0);
20 }
21
22 /* clang-format off */
23 #[fragment]
24
25 layout(location = 0) out vec4 frag_color;
26 in vec2 uv_interp;
27
28 /* clang-format on */
29 #ifdef USE_EXTERNAL_SAMPLER
30 uniform samplerExternalOES sourceFeed; // texunit:0
31 #else
32 uniform sampler2D sourceFeed; // texunit:0
33 #endif
34
35 void main() {
36 vec4 color = texture(sourceFeed, uv_interp);
37
38 frag_color = color;
39 }