Revision 94f6d472
Added by Leszek Koltunski about 7 years ago
src/main/res/raw/blit_fragment_shader.glsl | ||
---|---|---|
19 | 19 |
|
20 | 20 |
precision lowp float; |
21 | 21 |
|
22 |
in vec2 v_TexCoordinate; // Interpolated texture coordinate per fragment. |
|
22 |
#if __VERSION__ != 100 |
|
23 |
#define TEXTURE texture |
|
23 | 24 |
out vec4 fragColor; // The output color |
25 |
in vec2 v_TexCoordinate; // Interpolated texture coordinate per fragment. |
|
26 |
#else |
|
27 |
#define TEXTURE texture2D |
|
28 |
varying vec2 v_TexCoordinate; // Interpolated texture coordinate per fragment. |
|
29 |
#endif |
|
30 |
|
|
24 | 31 |
uniform sampler2D u_Texture; // The input texture. |
25 | 32 |
|
26 | 33 |
////////////////////////////////////////////////////////////////////////////////////////////// |
27 | 34 |
|
28 | 35 |
void main() |
29 |
{ |
|
30 |
fragColor = texture(u_Texture,v_TexCoordinate); |
|
36 |
{ |
|
37 |
#if __VERSION__ != 100 |
|
38 |
fragColor = |
|
39 |
#else |
|
40 |
gl_FragColor = |
|
41 |
#endif |
|
42 |
|
|
43 |
TEXTURE(u_Texture,v_TexCoordinate); |
|
31 | 44 |
} |
Also available in: Unified diff
Make it more flexible; now it can run almost all apps on OpenGL 2.0 contexts; OpenGL 3.0 ( with GLSL 3.00) required for POSTPROCESSING.