pathfinder/shaders/gles2/xcaa-mono-subpixel-resolve....

31 lines
1.0 KiB
Plaintext
Raw Normal View History

// pathfinder/shaders/gles2/xcaa-mono-subpixel-resolve.vs.glsl
2017-09-07 17:58:41 -04:00
//
// Copyright (c) 2017 The Pathfinder Project Developers.
//
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
// option. This file may not be copied, modified, or distributed
// except according to those terms.
//! Performs subpixel antialiasing for LCD screens by converting a
//! 3x-oversampled single-channel color buffer to an RGB framebuffer, applying
//! the FreeType color defringing filter as necessary.
2017-09-07 17:58:41 -04:00
precision highp float;
2018-01-04 20:32:20 -05:00
/// A dilation (scale and transform) to be applied to the quad.
2017-09-07 17:58:41 -04:00
uniform vec4 uTransformST;
2018-01-04 20:32:20 -05:00
/// A fixed pair of factors to be applied to the texture coordinates.
2017-09-07 17:58:41 -04:00
uniform vec2 uTexScale;
attribute vec2 aPosition;
attribute vec2 aTexCoord;
varying vec2 vTexCoord;
void main() {
gl_Position = vec4(transformVertexPositionST(aPosition, uTransformST), -1.0, 1.0);
vTexCoord = aTexCoord * uTexScale;
}