summaryrefslogtreecommitdiff
path: root/drivers/gles2/shaders/blur.glsl
blob: b68a55aee70e949da8d72dd67262bf80bf3b9acc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
[vertex]

#ifdef USE_GLES_OVER_GL
#define mediump
#define highp
#else
precision mediump float;
precision mediump int;
#endif

attribute highp vec4 vertex_attrib; // attrib:0
attribute vec2 uv_in; // attrib:4

varying vec2 uv_out;



void main() {

        color_interp = color_attrib;
        uv_interp = uv_attrib;
        vec4 outvec = vec4(vertex, 1.0);
        outvec = extra_matrix * outvec;
        outvec = modelview_matrix * outvec;
        gl_Position = projection_matrix * outvec;
}

[fragment]

#ifdef USE_GLES_OVER_GL
#define mediump
#define highp
#else
precision mediump float;
precision mediump int;
#endif

 // texunit:0
uniform sampler2D texture;
varying vec2 uv_out;


void main() {

        vec4 color = color_interp;

        color *= texture2D( texture,  uv_interp );

        gl_FragColor = color;
}