pathfinder/shaders/gles2/direct-interior.vs.glsl

24 lines
618 B
Plaintext
Raw Normal View History

// pathfinder/shaders/gles2/direct-interior.vs.glsl
//
// Copyright (c) 2017 Mozilla Foundation
precision highp float;
uniform mat4 uTransform;
uniform ivec2 uFramebufferSize;
uniform ivec2 uPathColorsDimensions;
uniform sampler2D uPathColors;
attribute vec2 aPosition;
2017-08-13 16:39:51 -04:00
attribute float aPathDepth;
varying vec4 vColor;
void main() {
vec2 position = transformVertexPosition(aPosition, uTransform);
position = convertScreenToClipSpace(position, uFramebufferSize);
2017-08-13 16:39:51 -04:00
gl_Position = vec4(position, aPathDepth, 1.0);
2017-08-15 00:24:58 -04:00
vColor = fetchFloat4NormIndexedData(uPathColors, aPathDepth, uPathColorsDimensions);
}