UNPKG

fabric

Version:

Object model for HTML5 canvas, and SVG-to-canvas parser. Backed by jsdom and node-canvas.

12 lines (11 loc) 369 B
export const fragmentSource = ` precision highp float; uniform sampler2D uTexture; uniform float uContrast; varying vec2 vTexCoord; void main() { vec4 color = texture2D(uTexture, vTexCoord); float contrastF = 1.015 * (uContrast + 1.0) / (1.0 * (1.015 - uContrast)); color.rgb = contrastF * (color.rgb - 0.5) + 0.5; gl_FragColor = color; }`;