summaryrefslogtreecommitdiff
path: root/src/shader/icon.fragment.glsl
blob: a3191b3a8d232c35696c8105e5e0ed1cc5921f9d (plain)
1
2
3
4
5
6
7
8
9
10
11
uniform sampler2D u_image;
uniform vec2 u_dimension;
uniform vec4 u_color;
uniform float u_size;

varying vec2 v_tex;

void main() {
    vec2 pos = (v_tex + (gl_PointCoord - 0.5) * u_size) / u_dimension;
    gl_FragColor = texture2D(u_image, pos);
}