blob: 6f86bf23933f1feb8fd5d33e19f227f78630068b [file] [edit]
// Copyright 2013 The Flutter Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include <impeller/types.glsl>
uniform sampler2D glyph_atlas_sampler;
uniform FragInfo {
vec4 text_color;
}
frag_info;
in vec2 v_uv;
in float v_has_color;
out vec4 frag_color;
void main() {
vec4 value = texture(glyph_atlas_sampler, v_uv);
if (v_has_color != 1.0) {
value = value.aaaa;
}
frag_color = value * frag_info.text_color;
}