diff --git a/shaders/gles2/blit.vs.glsl b/shaders/gles2/blit.vs.glsl index 02b62bec..c3a7ceb9 100644 --- a/shaders/gles2/blit.vs.glsl +++ b/shaders/gles2/blit.vs.glsl @@ -14,13 +14,11 @@ precision mediump float; /// A 3D transform to apply to the scene. uniform mat4 uTransform; - /// A pair of fixed scale factors to be applied to the texture coordinates. uniform vec2 uTexScale; /// The 2D vertex position. attribute vec2 aPosition; - /// The texture coordinate. attribute vec2 aTexCoord; diff --git a/shaders/gles2/demo-3d-distant-glyph.vs.glsl b/shaders/gles2/demo-3d-distant-glyph.vs.glsl index c206e638..71ed5c9c 100644 --- a/shaders/gles2/demo-3d-distant-glyph.vs.glsl +++ b/shaders/gles2/demo-3d-distant-glyph.vs.glsl @@ -12,8 +12,11 @@ precision highp float; +/// A concatenated transform to be applied to each point. uniform mat4 uTransform; +/// The texture coordinates for this glyph. uniform vec4 uGlyphTexCoords; +/// The size of the glyph in local coordinates. uniform vec2 uGlyphSize; attribute vec2 aQuadPosition; diff --git a/shaders/gles2/demo-3d-monument.vs.glsl b/shaders/gles2/demo-3d-monument.vs.glsl index a0d3eb8b..bb8bb5f4 100644 --- a/shaders/gles2/demo-3d-monument.vs.glsl +++ b/shaders/gles2/demo-3d-monument.vs.glsl @@ -12,7 +12,9 @@ precision mediump float; +/// The 3D projection matrix. uniform mat4 uProjection; +/// The 3D modelview matrix. uniform mat4 uModelview; attribute vec3 aPosition; diff --git a/shaders/gles2/direct-curve.vs.glsl b/shaders/gles2/direct-curve.vs.glsl index 15421e12..24f6f3df 100644 --- a/shaders/gles2/direct-curve.vs.glsl +++ b/shaders/gles2/direct-curve.vs.glsl @@ -21,15 +21,24 @@ precision highp float; +/// A 3D transform to be applied to all points. uniform mat4 uTransform; +/// Vertical snapping positions. uniform vec4 uHints; -uniform vec2 uEmboldenAmount; +/// The size of the path colors texture in texels. uniform ivec2 uPathColorsDimensions; +/// The fill color for each path. uniform sampler2D uPathColors; +/// The size of the path transform buffer texture in texels. uniform ivec2 uPathTransformSTDimensions; +/// The path transform buffer texture, one path dilation per texel. uniform sampler2D uPathTransformST; +/// The size of the extra path transform factors buffer texture in texels. uniform ivec2 uPathTransformExtDimensions; +/// The extra path transform factors buffer texture, packed two path transforms per texel. uniform sampler2D uPathTransformExt; +/// The amount of faux-bold to apply, in local path units. +uniform vec2 uEmboldenAmount; attribute vec2 aPosition; attribute vec2 aTexCoord; diff --git a/shaders/gles2/direct-interior.vs.glsl b/shaders/gles2/direct-interior.vs.glsl index f5e5f3c4..ff5ea1c0 100644 --- a/shaders/gles2/direct-interior.vs.glsl +++ b/shaders/gles2/direct-interior.vs.glsl @@ -16,15 +16,24 @@ precision highp float; +/// A 3D transform to be applied to all points. uniform mat4 uTransform; +/// Vertical snapping positions. uniform vec4 uHints; -uniform vec2 uEmboldenAmount; +/// The size of the path colors texture in texels. uniform ivec2 uPathColorsDimensions; +/// The fill color for each path. uniform sampler2D uPathColors; +/// The size of the path transform buffer texture in texels. uniform ivec2 uPathTransformSTDimensions; +/// The path transform buffer texture, one path dilation per texel. uniform sampler2D uPathTransformST; +/// The size of the extra path transform factors buffer texture in texels. uniform ivec2 uPathTransformExtDimensions; +/// The extra path transform factors buffer texture, packed two path transforms per texel. uniform sampler2D uPathTransformExt; +/// The amount of faux-bold to apply, in local path units. +uniform vec2 uEmboldenAmount; attribute vec2 aPosition; attribute float aPathID; diff --git a/shaders/gles2/ecaa-curve.vs.glsl b/shaders/gles2/ecaa-curve.vs.glsl index b3c02184..db551e53 100644 --- a/shaders/gles2/ecaa-curve.vs.glsl +++ b/shaders/gles2/ecaa-curve.vs.glsl @@ -26,15 +26,25 @@ precision highp float; +/// A 3D transform to be applied to the object. uniform mat4 uTransform; +/// Vertical snapping positions. uniform vec4 uHints; +/// The framebuffer size in pixels. uniform ivec2 uFramebufferSize; -uniform ivec2 uPathTransformSTDimensions; -uniform sampler2D uPathTransformST; -uniform ivec2 uPathTransformExtDimensions; -uniform sampler2D uPathTransformExt; +/// The size of the path bounds texture in texels. uniform ivec2 uPathBoundsDimensions; +/// The path bounds texture, one rect per path ID. uniform sampler2D uPathBounds; +/// The size of the path transform buffer texture in texels. +uniform ivec2 uPathTransformSTDimensions; +/// The path transform buffer texture, one path dilation per texel. +uniform sampler2D uPathTransformST; +/// The size of the extra path transform factors buffer texture in texels. +uniform ivec2 uPathTransformExtDimensions; +/// The extra path transform factors buffer texture, packed two path transforms per texel. +uniform sampler2D uPathTransformExt; +/// The amount of faux-bold to apply, in local path units. uniform vec2 uEmboldenAmount; attribute vec2 aQuadPosition; diff --git a/shaders/gles2/ecaa-line.vs.glsl b/shaders/gles2/ecaa-line.vs.glsl index 56904126..7074cb60 100644 --- a/shaders/gles2/ecaa-line.vs.glsl +++ b/shaders/gles2/ecaa-line.vs.glsl @@ -24,15 +24,25 @@ precision highp float; +/// A 3D transform to be applied to the object. uniform mat4 uTransform; +/// Vertical snapping positions. uniform vec4 uHints; +/// The framebuffer size in pixels. uniform ivec2 uFramebufferSize; +/// The size of the path bounds texture in texels. uniform ivec2 uPathBoundsDimensions; +/// The path bounds texture, one rect per path ID. uniform sampler2D uPathBounds; +/// The size of the path transform buffer texture in texels. uniform ivec2 uPathTransformSTDimensions; +/// The path transform buffer texture, one path dilation per texel. uniform sampler2D uPathTransformST; +/// The size of the extra path transform factors buffer texture in texels. uniform ivec2 uPathTransformExtDimensions; +/// The extra path transform factors buffer texture, packed two path transforms per texel. uniform sampler2D uPathTransformExt; +/// The amount of faux-bold to apply, in local path units. uniform vec2 uEmboldenAmount; attribute vec2 aQuadPosition; diff --git a/shaders/gles2/ecaa-transformed-curve.vs.glsl b/shaders/gles2/ecaa-transformed-curve.vs.glsl index 973efdd7..3d8951f1 100644 --- a/shaders/gles2/ecaa-transformed-curve.vs.glsl +++ b/shaders/gles2/ecaa-transformed-curve.vs.glsl @@ -30,16 +30,30 @@ precision highp float; +/// A 3D transform to be applied to all points. uniform mat4 uTransform; +/// Vertical snapping positions. uniform vec4 uHints; +/// The framebuffer size in pixels. uniform ivec2 uFramebufferSize; -uniform ivec2 uPathTransformSTDimensions; -uniform sampler2D uPathTransformST; -uniform ivec2 uPathTransformExtDimensions; -uniform sampler2D uPathTransformExt; +/// The size of the path bounds texture in texels. uniform ivec2 uPathBoundsDimensions; +/// The path bounds texture, one rect per path ID. uniform sampler2D uPathBounds; +/// The size of the path transform buffer texture in texels. +uniform ivec2 uPathTransformSTDimensions; +/// The path transform buffer texture, one path dilation per texel. +uniform sampler2D uPathTransformST; +/// The size of the extra path transform factors buffer texture in texels. +uniform ivec2 uPathTransformExtDimensions; +/// The extra path transform factors buffer texture, packed two path transforms per texel. +uniform sampler2D uPathTransformExt; +/// The amount of faux-bold to apply, in local path units. uniform vec2 uEmboldenAmount; +/// The pass index: 0 or 1. +/// +/// This is a multipass algorithm: first, issue a draw call with this value set to 0; then, issue +/// an identical draw call with this value set to 1. uniform int uPassIndex; attribute vec2 aQuadPosition; diff --git a/shaders/gles2/mcaa.vs.glsl b/shaders/gles2/mcaa.vs.glsl index 8b2ead99..2aeaa42c 100644 --- a/shaders/gles2/mcaa.vs.glsl +++ b/shaders/gles2/mcaa.vs.glsl @@ -34,13 +34,23 @@ precision highp float; +/// A dilation (scale and translation) to be applied to the object. uniform vec4 uTransformST; +/// Vertical snapping positions. uniform vec4 uHints; +/// The framebuffer size in pixels. uniform ivec2 uFramebufferSize; +/// The size of the path transform buffer texture in texels. uniform ivec2 uPathTransformSTDimensions; +/// The path transform buffer texture, one dilation per path ID. uniform sampler2D uPathTransformST; +/// The size of the path colors buffer texture in texels. uniform ivec2 uPathColorsDimensions; +/// The path colors buffer texture, one color per path ID. uniform sampler2D uPathColors; +/// True if multiple colors are being rendered; false otherwise. +/// +/// If this is true, then points will be snapped to the nearest pixel. uniform bool uMulticolor; attribute vec2 aQuadPosition; diff --git a/shaders/gles2/xcaa-mono-resolve.vs.glsl b/shaders/gles2/xcaa-mono-resolve.vs.glsl index 18f24930..0f80873b 100644 --- a/shaders/gles2/xcaa-mono-resolve.vs.glsl +++ b/shaders/gles2/xcaa-mono-resolve.vs.glsl @@ -12,7 +12,9 @@ precision highp float; +/// A dilation (scale and transform) to be applied to the quad. uniform vec4 uTransformST; +/// A fixed pair of factors to be applied to the texture coordinates. uniform vec2 uTexScale; attribute vec2 aPosition; diff --git a/shaders/gles2/xcaa-mono-subpixel-resolve.vs.glsl b/shaders/gles2/xcaa-mono-subpixel-resolve.vs.glsl index 86751768..1ea8e753 100644 --- a/shaders/gles2/xcaa-mono-subpixel-resolve.vs.glsl +++ b/shaders/gles2/xcaa-mono-subpixel-resolve.vs.glsl @@ -14,7 +14,9 @@ precision highp float; +/// A dilation (scale and transform) to be applied to the quad. uniform vec4 uTransformST; +/// A fixed pair of factors to be applied to the texture coordinates. uniform vec2 uTexScale; attribute vec2 aPosition;