| 1 |
{ -*- buffer-read-only: t -*- } |
| 2 |
{ DON'T EDIT -- this file was automatically generated from "source/image.fs" } |
| 3 |
'varying vec2 tex_coord_frag;' + LineEnding + |
| 4 |
'uniform sampler2D image_texture;' + LineEnding + |
| 5 |
'' + LineEnding + |
| 6 |
'#ifdef COLOR_UNIFORM' + LineEnding + |
| 7 |
'uniform vec4 color;' + LineEnding + |
| 8 |
'#endif' + LineEnding + |
| 9 |
'' + LineEnding + |
| 10 |
'#ifdef CLIP_LINE' + LineEnding + |
| 11 |
'uniform vec3 clip_line;' + LineEnding + |
| 12 |
'/* Not using "gl_FragCoord.xy / gl_FragCoord.w", for unknown reason it doesn''t' + LineEnding + |
| 13 |
' * compile (tested on Mesa OpenGL ES, and Nexus 5 OpenGL ES). */' + LineEnding + |
| 14 |
'varying vec2 frag_coord;' + LineEnding + |
| 15 |
'#endif' + LineEnding + |
| 16 |
'' + LineEnding + |
| 17 |
'void main(void)' + LineEnding + |
| 18 |
'{' + LineEnding + |
| 19 |
'#ifdef COLOR_UNIFORM' + LineEnding + |
| 20 |
' gl_FragColor = color;' + LineEnding + |
| 21 |
'#ifdef TEXTURE_HAS_ONLY_ALPHA' + LineEnding + |
| 22 |
' gl_FragColor.a *= texture2D(image_texture, tex_coord_frag).a;' + LineEnding + |
| 23 |
'#else' + LineEnding + |
| 24 |
' gl_FragColor *= texture2D(image_texture, tex_coord_frag);' + LineEnding + |
| 25 |
'#endif' + LineEnding + |
| 26 |
'#else' + LineEnding + |
| 27 |
' gl_FragColor = texture2D(image_texture, tex_coord_frag);' + LineEnding + |
| 28 |
'#endif' + LineEnding + |
| 29 |
'' + LineEnding + |
| 30 |
'#ifdef ALPHA_TEST' + LineEnding + |
| 31 |
' if (gl_FragColor.a < 0.5) discard;' + LineEnding + |
| 32 |
'#endif' + LineEnding + |
| 33 |
'#ifdef CLIP_LINE' + LineEnding + |
| 34 |
' if (dot(clip_line.xy, tex_coord_frag) + clip_line.z < 0.0) discard;' + LineEnding + |
| 35 |
'#endif' + LineEnding + |
| 36 |
'}' + LineEnding + |
| 37 |
'' |