Debian Codegraph @

visualization.pictureit/resources/shaders/GL/frag.glsl

raw
1 #version 130
2
3 // Uniforms
4 uniform sampler2D u_texUnit;
5 uniform int u_textureId;
6
7 // Varyings
8 in vec4 v_frontColor;
9 in vec2 v_texCoord0;
10
11 void main()
12 {
13 if (u_textureId != 0)
14 gl_FragColor = texture2D(u_texUnit, v_texCoord0) * v_frontColor;
15 else
16 gl_FragColor = v_frontColor;
17 }