Constant nannou::ui::backend::glium::FRAGMENT_SHADER_140 [] [src]

pub const FRAGMENT_SHADER_140: &'static str = "\n    #version 140\n    uniform sampler2D tex;\n\n    in vec2 v_tex_coords;\n    in vec4 v_color;\n    flat in uint v_mode;\n\n    out vec4 f_color;\n\n    void main() {\n        // Text\n        if (v_mode == uint(0)) {\n            f_color = v_color * vec4(1.0, 1.0, 1.0, texture(tex, v_tex_coords).r);\n\n        // Image\n        } else if (v_mode == uint(1)) {\n            f_color = texture(tex, v_tex_coords);\n\n        // 2D Geometry\n        } else if (v_mode == uint(2)) {\n            f_color = v_color;\n        }\n    }\n"

The fragment shader used within the glium::Program for OpenGL.