visualization.pictureit/resources/shaders/GLES/frag.glsl
raw| 1 | #version 100 |
| 2 | |
| 3 | precision mediump float; |
| 4 | |
| 5 | // Uniforms |
| 6 | uniform sampler2D u_texUnit; |
| 7 | uniform int u_textureId; |
| 8 | |
| 9 | // Varyings |
| 10 | varying vec4 v_frontColor; |
| 11 | varying vec2 v_texCoord0; |
| 12 | |
| 13 | void main() |
| 14 | { |
| 15 | if (u_textureId != 0) |
| 16 | gl_FragColor = texture2D(u_texUnit, v_texCoord0) * v_frontColor; |
| 17 | else |
| 18 | gl_FragColor = v_frontColor; |
| 19 | } |