Created
February 19, 2021 04:03
-
-
Save alexiscn/53d93aae95023293e5017e152f871b68 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[ | |
{ | |
"filter": "IGNormalFilter", | |
"fragmentShader": "", | |
"filterName": "Normal", | |
"samplers": {}, | |
"vertexShader": "", | |
"fullVertexShader": "attribute vec3 a_position; attribute vec2 a_texCoord; uniform mat4 u_contentTransform; uniform mat4 u_texCoordTransform; varying vec2 textureCoordinate; varying vec2 sourceTextureCoordinate; void main() { gl_Position = u_contentTransform * vec4(a_position, 1.0); textureCoordinate = a_texCoord + vec2(0.5); vec4 texel = u_texCoordTransform * vec4(a_texCoord, 0.0, 1.0); sourceTextureCoordinate = texel.xy / texel.w + vec2(0.5); }", | |
"fullFragmentShader": "precision mediump float;varying vec2 textureCoordinate; varying vec2 sourceTextureCoordinate;\nuniform sampler2D s_texture; void main() { vec4 texel = texture2D(s_texture, sourceTextureCoordinate);vec4 inputTexel = texel; \ngl_FragColor = texel;\n}" | |
}, | |
{ | |
"filter": "IGClarendonVideoFilter", | |
"fragmentShader": "// apply lgg curves\n texel.r = texture2D(map, vec2(texel.r, 0.5)).r;\n texel.g = texture2D(map, vec2(texel.g, 0.5)).g;\n texel.b = texture2D(map, vec2(texel.b, 0.5)).b;\n\n // darken shadows + saturation\n float luma = dot(vec3(0.2126, 0.7152, 0.0722), texel.rgb);\n float shadowCoeff = 0.35 * max(0.0, 1.0 - luma);\n texel.rgb = mix(texel.rgb, max(vec3(0.0), 2.0 * texel.rgb - 1.0), shadowCoeff);\n texel.rgb = mix(texel.rgb, vec3(luma), -0.3);\n\n // apply color curves\n texel.r = texture2D(map2, vec2(texel.r, 0.5)).r;\n texel.g = texture2D(map2, vec2(texel.g, 0.5)).g;\n texel.b = texture2D(map2, vec2(texel.b, 0.5)).b;", | |
"filterName": "Clarendon", | |
"samplers": { | |
"map": "Glacial1.png", | |
"map2": "Glacial2.png" | |
}, | |
"borderName": "filterBorderPlainWhite.png", | |
"vertexShader": "", | |
"fullVertexShader": "attribute vec3 a_position; attribute vec2 a_texCoord; uniform mat4 u_contentTransform; uniform mat4 u_texCoordTransform; varying vec2 textureCoordinate; varying vec2 sourceTextureCoordinate; void main() { gl_Position = u_contentTransform * vec4(a_position, 1.0); textureCoordinate = a_texCoord + vec2(0.5); vec4 texel = u_texCoordTransform * vec4(a_texCoord, 0.0, 1.0); sourceTextureCoordinate = texel.xy / texel.w + vec2(0.5); }", | |
"fullFragmentShader": "precision mediump float;varying vec2 textureCoordinate; varying vec2 sourceTextureCoordinate;\n uniform float strength; \nuniform sampler2D map; uniform sampler2D map2; \nuniform sampler2D s_texture; void main() { vec4 texel = texture2D(s_texture, sourceTextureCoordinate);vec4 inputTexel = texel;// apply lgg curves\n texel.r = texture2D(map, vec2(texel.r, 0.5)).r;\n texel.g = texture2D(map, vec2(texel.g, 0.5)).g;\n texel.b = texture2D(map, vec2(texel.b, 0.5)).b;\n\n // darken shadows + saturation\n float luma = dot(vec3(0.2126, 0.7152, 0.0722), texel.rgb);\n float shadowCoeff = 0.35 * max(0.0, 1.0 - luma);\n texel.rgb = mix(texel.rgb, max(vec3(0.0), 2.0 * texel.rgb - 1.0), shadowCoeff);\n texel.rgb = mix(texel.rgb, vec3(luma), -0.3);\n\n // apply color curves\n texel.r = texture2D(map2, vec2(texel.r, 0.5)).r;\n texel.g = texture2D(map2, vec2(texel.g, 0.5)).g;\n texel.b = texture2D(map2, vec2(texel.b, 0.5)).b; \ntexel.rgb = mix(inputTexel.rgb, texel.rgb, strength);\n\ngl_FragColor = texel;\n}" | |
}, | |
{ | |
"filter": "IGGinghamVideoFilter", | |
"fragmentShader": "// exposure adjust B'=B*2^(EV/2.2), EV = 0.4\n texel.rgb = min(texel.rgb * 1.1343, vec3(1.0));\n\n // apply curves\n texel.r = texture2D(map, vec2(texel.r, 0.5)).r;\n texel.g = texture2D(map, vec2(texel.g, 0.5)).g;\n texel.b = texture2D(map, vec2(texel.b, 0.5)).b;\n\n // color effects on shadows:\n vec3 shadowColor = vec3(0.956862, 0.0, 0.83529);\n float luma = dot(vec3(0.309, 0.609, 0.082), texel.rgb);\n vec3 shadowBlend = 2.0 * shadowColor * texel.rgb;\n float shadowAmount = 0.6 * max(0.0, (1.0 - 4.0 * luma));\n texel.rgb = mix(texel.rgb, shadowBlend, shadowAmount);\n\n // apply map for lift-gamma-gain + ranged saturation\n // by applying less lgg (desaturating) to shadows\n vec3 lgg;\n lgg.r = texture2D(mapLgg, vec2(texel.r, 0.5)).r;\n lgg.g = texture2D(mapLgg, vec2(texel.g, 0.5)).g;\n lgg.b = texture2D(mapLgg, vec2(texel.b, 0.5)).b;\n texel.rgb = mix(texel.rgb, lgg, min(1.0, 0.8 + luma));", | |
"filterName": "Gingham", | |
"samplers": { | |
"map": "vintage_signature_curves1.png", | |
"mapLgg": "vintage_signature_lgg_curves.png" | |
}, | |
"borderName": "filterBorderPlainWhite.png", | |
"vertexShader": "", | |
"fullVertexShader": "attribute vec3 a_position; attribute vec2 a_texCoord; uniform mat4 u_contentTransform; uniform mat4 u_texCoordTransform; varying vec2 textureCoordinate; varying vec2 sourceTextureCoordinate; void main() { gl_Position = u_contentTransform * vec4(a_position, 1.0); textureCoordinate = a_texCoord + vec2(0.5); vec4 texel = u_texCoordTransform * vec4(a_texCoord, 0.0, 1.0); sourceTextureCoordinate = texel.xy / texel.w + vec2(0.5); }", | |
"fullFragmentShader": "precision mediump float;varying vec2 textureCoordinate; varying vec2 sourceTextureCoordinate;\n uniform float strength; \nuniform sampler2D map; uniform sampler2D mapLgg; \nuniform sampler2D s_texture; void main() { vec4 texel = texture2D(s_texture, sourceTextureCoordinate);vec4 inputTexel = texel;// exposure adjust B'=B*2^(EV/2.2), EV = 0.4\n texel.rgb = min(texel.rgb * 1.1343, vec3(1.0));\n\n // apply curves\n texel.r = texture2D(map, vec2(texel.r, 0.5)).r;\n texel.g = texture2D(map, vec2(texel.g, 0.5)).g;\n texel.b = texture2D(map, vec2(texel.b, 0.5)).b;\n\n // color effects on shadows:\n vec3 shadowColor = vec3(0.956862, 0.0, 0.83529);\n float luma = dot(vec3(0.309, 0.609, 0.082), texel.rgb);\n vec3 shadowBlend = 2.0 * shadowColor * texel.rgb;\n float shadowAmount = 0.6 * max(0.0, (1.0 - 4.0 * luma));\n texel.rgb = mix(texel.rgb, shadowBlend, shadowAmount);\n\n // apply map for lift-gamma-gain + ranged saturation\n // by applying less lgg (desaturating) to shadows\n vec3 lgg;\n lgg.r = texture2D(mapLgg, vec2(texel.r, 0.5)).r;\n lgg.g = texture2D(mapLgg, vec2(texel.g, 0.5)).g;\n lgg.b = texture2D(mapLgg, vec2(texel.b, 0.5)).b;\n texel.rgb = mix(texel.rgb, lgg, min(1.0, 0.8 + luma)); \ntexel.rgb = mix(inputTexel.rgb, texel.rgb, strength);\n\ngl_FragColor = texel;\n}" | |
}, | |
{ | |
"filter": "IGMoonVideoFilter", | |
"fragmentShader": "// apply curves\n texel.r = texture2D(map1, vec2(texel.r, 0.5)).r;\n texel.g = texture2D(map1, vec2(texel.g, 0.5)).g;\n texel.b = texture2D(map1, vec2(texel.b, 0.5)).b;\n\n // saturation\n vec3 desat = vec3(dot(vec3(0.7, 0.2, 0.1), texel.rgb));\n texel.rgb = mix(texel.rgb, desat, 0.79);\n\n // channel-weighted bw conversion and exposure boost\n texel.rgb = vec3(min(1.0, 1.2 * dot(vec3(0.2, 0.7, 0.1), texel.rgb)));\n\n // apply final curves and lgg\n texel.r = texture2D(map2, vec2(texel.r, 0.5)).r;\n texel.g = texture2D(map2, vec2(texel.g, 0.5)).g;\n texel.b = texture2D(map2, vec2(texel.b, 0.5)).b;", | |
"filterName": "Moon", | |
"samplers": { | |
"map1": "bw_vintage_curves1.png", | |
"map2": "bw_vintage_curves2.png" | |
}, | |
"borderName": "filterBorderPlainWhite.png", | |
"vertexShader": "", | |
"fullVertexShader": "attribute vec3 a_position; attribute vec2 a_texCoord; uniform mat4 u_contentTransform; uniform mat4 u_texCoordTransform; varying vec2 textureCoordinate; varying vec2 sourceTextureCoordinate; void main() { gl_Position = u_contentTransform * vec4(a_position, 1.0); textureCoordinate = a_texCoord + vec2(0.5); vec4 texel = u_texCoordTransform * vec4(a_texCoord, 0.0, 1.0); sourceTextureCoordinate = texel.xy / texel.w + vec2(0.5); }", | |
"fullFragmentShader": "precision mediump float;varying vec2 textureCoordinate; varying vec2 sourceTextureCoordinate;\n uniform float strength; \nuniform sampler2D map1; uniform sampler2D map2; \nuniform sampler2D s_texture; void main() { vec4 texel = texture2D(s_texture, sourceTextureCoordinate);vec4 inputTexel = texel;// apply curves\n texel.r = texture2D(map1, vec2(texel.r, 0.5)).r;\n texel.g = texture2D(map1, vec2(texel.g, 0.5)).g;\n texel.b = texture2D(map1, vec2(texel.b, 0.5)).b;\n\n // saturation\n vec3 desat = vec3(dot(vec3(0.7, 0.2, 0.1), texel.rgb));\n texel.rgb = mix(texel.rgb, desat, 0.79);\n\n // channel-weighted bw conversion and exposure boost\n texel.rgb = vec3(min(1.0, 1.2 * dot(vec3(0.2, 0.7, 0.1), texel.rgb)));\n\n // apply final curves and lgg\n texel.r = texture2D(map2, vec2(texel.r, 0.5)).r;\n texel.g = texture2D(map2, vec2(texel.g, 0.5)).g;\n texel.b = texture2D(map2, vec2(texel.b, 0.5)).b; \ntexel.rgb = mix(inputTexel.rgb, texel.rgb, strength);\n\ngl_FragColor = texel;\n}" | |
}, | |
{ | |
"filter": "IGLarkFilter", | |
"fragmentShader": "texel.rgb = ig_texture3D(lookup, texel.rgb, 33.0).rgb;", | |
"filterName": "Lark", | |
"samplers": { | |
"lookup": "lark_map.png" | |
}, | |
"borderName": "filterBorderPlainWhite.png", | |
"vertexShader": "", | |
"fullVertexShader": "attribute vec3 a_position; attribute vec2 a_texCoord; uniform mat4 u_contentTransform; uniform mat4 u_texCoordTransform; varying vec2 textureCoordinate; varying vec2 sourceTextureCoordinate; void main() { gl_Position = u_contentTransform * vec4(a_position, 1.0); textureCoordinate = a_texCoord + vec2(0.5); vec4 texel = u_texCoordTransform * vec4(a_texCoord, 0.0, 1.0); sourceTextureCoordinate = texel.xy / texel.w + vec2(0.5); }", | |
"fullFragmentShader": "precision highp float;varying vec2 textureCoordinate; varying vec2 sourceTextureCoordinate;\n uniform float strength; \nuniform sampler2D lookup; \n// 'size' is the number of shades per channel (e.g., 65 for a 65x(65*65) color map)\n vec4 ig_texture3D(sampler2D tex, vec3 texCoord, float size) {\n float sliceSize = 1.0 / size;\n float slicePixelSize = sliceSize / size;\n float sliceInnerSize = slicePixelSize * (size - 1.0);\n\n float xOffset = 0.5 * sliceSize + texCoord.x * (1.0 - sliceSize);\n float yOffset = 0.5 * slicePixelSize + texCoord.y * sliceInnerSize;\n float zOffset = texCoord.z * (size - 1.0);\n\n float zSlice0 = floor(zOffset);\n float zSlice1 = zSlice0 + 1.0;\n float s0 = yOffset + (zSlice0 * sliceSize);\n float s1 = yOffset + (zSlice1 * sliceSize);\n vec4 slice0Color = texture2D(tex, vec2(xOffset, s0));\n vec4 slice1Color = texture2D(tex, vec2(xOffset, s1));\n\n return mix(slice0Color, slice1Color, zOffset - zSlice0);\n }uniform sampler2D s_texture; void main() { vec4 texel = texture2D(s_texture, sourceTextureCoordinate);vec4 inputTexel = texel;texel.rgb = ig_texture3D(lookup, texel.rgb, 33.0).rgb; \ntexel.rgb = mix(inputTexel.rgb, texel.rgb, strength);\n\ngl_FragColor = texel;\n}" | |
}, | |
{ | |
"filter": "IGReyesFilter", | |
"fragmentShader": "texel.rgb = ig_texture3D(lookup, texel.rgb, 33.0).rgb;", | |
"filterName": "Reyes", | |
"samplers": { | |
"lookup": "reyes_map.png" | |
}, | |
"borderName": "filterBorderPlainWhite.png", | |
"vertexShader": "", | |
"fullVertexShader": "attribute vec3 a_position; attribute vec2 a_texCoord; uniform mat4 u_contentTransform; uniform mat4 u_texCoordTransform; varying vec2 textureCoordinate; varying vec2 sourceTextureCoordinate; void main() { gl_Position = u_contentTransform * vec4(a_position, 1.0); textureCoordinate = a_texCoord + vec2(0.5); vec4 texel = u_texCoordTransform * vec4(a_texCoord, 0.0, 1.0); sourceTextureCoordinate = texel.xy / texel.w + vec2(0.5); }", | |
"fullFragmentShader": "precision highp float;varying vec2 textureCoordinate; varying vec2 sourceTextureCoordinate;\n uniform float strength; \nuniform sampler2D lookup; \n// 'size' is the number of shades per channel (e.g., 65 for a 65x(65*65) color map)\n vec4 ig_texture3D(sampler2D tex, vec3 texCoord, float size) {\n float sliceSize = 1.0 / size;\n float slicePixelSize = sliceSize / size;\n float sliceInnerSize = slicePixelSize * (size - 1.0);\n\n float xOffset = 0.5 * sliceSize + texCoord.x * (1.0 - sliceSize);\n float yOffset = 0.5 * slicePixelSize + texCoord.y * sliceInnerSize;\n float zOffset = texCoord.z * (size - 1.0);\n\n float zSlice0 = floor(zOffset);\n float zSlice1 = zSlice0 + 1.0;\n float s0 = yOffset + (zSlice0 * sliceSize);\n float s1 = yOffset + (zSlice1 * sliceSize);\n vec4 slice0Color = texture2D(tex, vec2(xOffset, s0));\n vec4 slice1Color = texture2D(tex, vec2(xOffset, s1));\n\n return mix(slice0Color, slice1Color, zOffset - zSlice0);\n }uniform sampler2D s_texture; void main() { vec4 texel = texture2D(s_texture, sourceTextureCoordinate);vec4 inputTexel = texel;texel.rgb = ig_texture3D(lookup, texel.rgb, 33.0).rgb; \ntexel.rgb = mix(inputTexel.rgb, texel.rgb, strength);\n\ngl_FragColor = texel;\n}" | |
}, | |
{ | |
"filter": "IGJunoFilter", | |
"fragmentShader": "texel.rgb = ig_texture3D(lookup, texel.rgb, 33.0).rgb;", | |
"filterName": "Juno", | |
"samplers": { | |
"lookup": "juno_map.png" | |
}, | |
"borderName": "filterBorderPlainWhite.png", | |
"vertexShader": "", | |
"fullVertexShader": "attribute vec3 a_position; attribute vec2 a_texCoord; uniform mat4 u_contentTransform; uniform mat4 u_texCoordTransform; varying vec2 textureCoordinate; varying vec2 sourceTextureCoordinate; void main() { gl_Position = u_contentTransform * vec4(a_position, 1.0); textureCoordinate = a_texCoord + vec2(0.5); vec4 texel = u_texCoordTransform * vec4(a_texCoord, 0.0, 1.0); sourceTextureCoordinate = texel.xy / texel.w + vec2(0.5); }", | |
"fullFragmentShader": "precision highp float;varying vec2 textureCoordinate; varying vec2 sourceTextureCoordinate;\n uniform float strength; \nuniform sampler2D lookup; \n// 'size' is the number of shades per channel (e.g., 65 for a 65x(65*65) color map)\n vec4 ig_texture3D(sampler2D tex, vec3 texCoord, float size) {\n float sliceSize = 1.0 / size;\n float slicePixelSize = sliceSize / size;\n float sliceInnerSize = slicePixelSize * (size - 1.0);\n\n float xOffset = 0.5 * sliceSize + texCoord.x * (1.0 - sliceSize);\n float yOffset = 0.5 * slicePixelSize + texCoord.y * sliceInnerSize;\n float zOffset = texCoord.z * (size - 1.0);\n\n float zSlice0 = floor(zOffset);\n float zSlice1 = zSlice0 + 1.0;\n float s0 = yOffset + (zSlice0 * sliceSize);\n float s1 = yOffset + (zSlice1 * sliceSize);\n vec4 slice0Color = texture2D(tex, vec2(xOffset, s0));\n vec4 slice1Color = texture2D(tex, vec2(xOffset, s1));\n\n return mix(slice0Color, slice1Color, zOffset - zSlice0);\n }uniform sampler2D s_texture; void main() { vec4 texel = texture2D(s_texture, sourceTextureCoordinate);vec4 inputTexel = texel;texel.rgb = ig_texture3D(lookup, texel.rgb, 33.0).rgb; \ntexel.rgb = mix(inputTexel.rgb, texel.rgb, strength);\n\ngl_FragColor = texel;\n}" | |
}, | |
{ | |
"filter": "IGSlumberFilter", | |
"fragmentShader": "// Component wise blending\n#define Blend(base, blend, funcf) vec3(funcf(base.r, blend.r), funcf(base.g, blend.g), funcf(base.b, blend.b))\n#define BlendOverlayf(base, blend) (base < 0.5 ? (2.0 * base * blend) : (1.0 - 2.0 * (1.0 - base) * (1.0 - blend)))\n#define BlendOverlay(base, blend) Blend(base, blend, BlendOverlayf)\n\n texel.rgb = ig_texture3D(lookup, texel.rgb, 33.0).rgb;\n\n {\n // bottom dark fill gradient\n vec4 gradStart = vec4(vec3(0.125), 1.0);\n vec4 gradEnd = vec4(vec3(0.258), 0.0);\n float gradCoord = (1.0 - textureCoordinate.y);\n\n gradCoord = clamp(gradCoord, 0.0, 1.0);\n vec4 gradColor = mix(gradStart, gradEnd, gradCoord);\n vec3 gradBlend = BlendOverlay(texel.rgb, gradColor.rgb);\n float gradOpac = 0.3 * gradColor.a;\n texel.rgb = gradOpac * gradBlend + (1.0 - gradOpac) * texel.rgb;\n }", | |
"filterName": "Slumber", | |
"samplers": { | |
"lookup": "slumber_map.png" | |
}, | |
"borderName": "filterBorderPlainWhite.png", | |
"vertexShader": "", | |
"fullVertexShader": "attribute vec3 a_position; attribute vec2 a_texCoord; uniform mat4 u_contentTransform; uniform mat4 u_texCoordTransform; varying vec2 textureCoordinate; varying vec2 sourceTextureCoordinate; void main() { gl_Position = u_contentTransform * vec4(a_position, 1.0); textureCoordinate = a_texCoord + vec2(0.5); vec4 texel = u_texCoordTransform * vec4(a_texCoord, 0.0, 1.0); sourceTextureCoordinate = texel.xy / texel.w + vec2(0.5); }", | |
"fullFragmentShader": "precision highp float;varying vec2 textureCoordinate; varying vec2 sourceTextureCoordinate;\n uniform float strength; \nuniform sampler2D lookup; \n// 'size' is the number of shades per channel (e.g., 65 for a 65x(65*65) color map)\n vec4 ig_texture3D(sampler2D tex, vec3 texCoord, float size) {\n float sliceSize = 1.0 / size;\n float slicePixelSize = sliceSize / size;\n float sliceInnerSize = slicePixelSize * (size - 1.0);\n\n float xOffset = 0.5 * sliceSize + texCoord.x * (1.0 - sliceSize);\n float yOffset = 0.5 * slicePixelSize + texCoord.y * sliceInnerSize;\n float zOffset = texCoord.z * (size - 1.0);\n\n float zSlice0 = floor(zOffset);\n float zSlice1 = zSlice0 + 1.0;\n float s0 = yOffset + (zSlice0 * sliceSize);\n float s1 = yOffset + (zSlice1 * sliceSize);\n vec4 slice0Color = texture2D(tex, vec2(xOffset, s0));\n vec4 slice1Color = texture2D(tex, vec2(xOffset, s1));\n\n return mix(slice0Color, slice1Color, zOffset - zSlice0);\n }uniform sampler2D s_texture; void main() { vec4 texel = texture2D(s_texture, sourceTextureCoordinate);vec4 inputTexel = texel;// Component wise blending\n#define Blend(base, blend, funcf) vec3(funcf(base.r, blend.r), funcf(base.g, blend.g), funcf(base.b, blend.b))\n#define BlendOverlayf(base, blend) (base < 0.5 ? (2.0 * base * blend) : (1.0 - 2.0 * (1.0 - base) * (1.0 - blend)))\n#define BlendOverlay(base, blend) Blend(base, blend, BlendOverlayf)\n\n texel.rgb = ig_texture3D(lookup, texel.rgb, 33.0).rgb;\n\n {\n // bottom dark fill gradient\n vec4 gradStart = vec4(vec3(0.125), 1.0);\n vec4 gradEnd = vec4(vec3(0.258), 0.0);\n float gradCoord = (1.0 - textureCoordinate.y);\n\n gradCoord = clamp(gradCoord, 0.0, 1.0);\n vec4 gradColor = mix(gradStart, gradEnd, gradCoord);\n vec3 gradBlend = BlendOverlay(texel.rgb, gradColor.rgb);\n float gradOpac = 0.3 * gradColor.a;\n texel.rgb = gradOpac * gradBlend + (1.0 - gradOpac) * texel.rgb;\n } \ntexel.rgb = mix(inputTexel.rgb, texel.rgb, strength);\n\ngl_FragColor = texel;\n}" | |
}, | |
{ | |
"filter": "IGCremaFilter", | |
"fragmentShader": "texel.rgb = ig_texture3D(lookup, texel.rgb, 33.0).rgb;", | |
"filterName": "Crema", | |
"samplers": { | |
"lookup": "crema_map.png" | |
}, | |
"borderName": "filterBorderPlainWhite.png", | |
"vertexShader": "", | |
"fullVertexShader": "attribute vec3 a_position; attribute vec2 a_texCoord; uniform mat4 u_contentTransform; uniform mat4 u_texCoordTransform; varying vec2 textureCoordinate; varying vec2 sourceTextureCoordinate; void main() { gl_Position = u_contentTransform * vec4(a_position, 1.0); textureCoordinate = a_texCoord + vec2(0.5); vec4 texel = u_texCoordTransform * vec4(a_texCoord, 0.0, 1.0); sourceTextureCoordinate = texel.xy / texel.w + vec2(0.5); }", | |
"fullFragmentShader": "precision highp float;varying vec2 textureCoordinate; varying vec2 sourceTextureCoordinate;\n uniform float strength; \nuniform sampler2D lookup; \n// 'size' is the number of shades per channel (e.g., 65 for a 65x(65*65) color map)\n vec4 ig_texture3D(sampler2D tex, vec3 texCoord, float size) {\n float sliceSize = 1.0 / size;\n float slicePixelSize = sliceSize / size;\n float sliceInnerSize = slicePixelSize * (size - 1.0);\n\n float xOffset = 0.5 * sliceSize + texCoord.x * (1.0 - sliceSize);\n float yOffset = 0.5 * slicePixelSize + texCoord.y * sliceInnerSize;\n float zOffset = texCoord.z * (size - 1.0);\n\n float zSlice0 = floor(zOffset);\n float zSlice1 = zSlice0 + 1.0;\n float s0 = yOffset + (zSlice0 * sliceSize);\n float s1 = yOffset + (zSlice1 * sliceSize);\n vec4 slice0Color = texture2D(tex, vec2(xOffset, s0));\n vec4 slice1Color = texture2D(tex, vec2(xOffset, s1));\n\n return mix(slice0Color, slice1Color, zOffset - zSlice0);\n }uniform sampler2D s_texture; void main() { vec4 texel = texture2D(s_texture, sourceTextureCoordinate);vec4 inputTexel = texel;texel.rgb = ig_texture3D(lookup, texel.rgb, 33.0).rgb; \ntexel.rgb = mix(inputTexel.rgb, texel.rgb, strength);\n\ngl_FragColor = texel;\n}" | |
}, | |
{ | |
"filter": "IGLudwigFilter", | |
"fragmentShader": "texel.rgb = ig_texture3D(lookup, texel.rgb, 33.0).rgb;\n\n // Component wise blending\n#define Blend(base, blend, funcf) vec3(funcf(base.r, blend.r), funcf(base.g, blend.g), funcf(base.b, blend.b))\n#define BlendOverlayf(base, blend) (base < 0.5 ? (2.0 * base * blend) : (1.0 - 2.0 * (1.0 - base) * (1.0 - blend)))\n#define BlendOverlay(base, blend) Blend(base, blend, BlendOverlayf)\n\n {\n // overlay gradient\n vec4 gradStart = vec4(vec3(0.125), 1.0);\n vec4 gradEnd = vec4(vec3(0.2588), 0.0);\n\n vec4 gradColor = mix(gradStart, gradEnd, 1.0 - textureCoordinate.y);\n //texel.rgb = gradColor.rgb * gradColor.a + (1.0 - gradColor.a) * texel.rgb;\n vec3 gradBlend = BlendOverlay(texel.rgb, gradColor.rgb);\n float gradOpac = 0.20 * gradColor.a;\n\n texel.rgb = gradOpac * gradBlend + (1.0 - gradOpac) * texel.rgb;\n }", | |
"filterName": "Ludwig", | |
"samplers": { | |
"lookup": "ludwig_map.png" | |
}, | |
"borderName": "filterBorderPlainWhite.png", | |
"vertexShader": "", | |
"fullVertexShader": "attribute vec3 a_position; attribute vec2 a_texCoord; uniform mat4 u_contentTransform; uniform mat4 u_texCoordTransform; varying vec2 textureCoordinate; varying vec2 sourceTextureCoordinate; void main() { gl_Position = u_contentTransform * vec4(a_position, 1.0); textureCoordinate = a_texCoord + vec2(0.5); vec4 texel = u_texCoordTransform * vec4(a_texCoord, 0.0, 1.0); sourceTextureCoordinate = texel.xy / texel.w + vec2(0.5); }", | |
"fullFragmentShader": "precision highp float;varying vec2 textureCoordinate; varying vec2 sourceTextureCoordinate;\n uniform float strength; \nuniform sampler2D lookup; \n// 'size' is the number of shades per channel (e.g., 65 for a 65x(65*65) color map)\n vec4 ig_texture3D(sampler2D tex, vec3 texCoord, float size) {\n float sliceSize = 1.0 / size;\n float slicePixelSize = sliceSize / size;\n float sliceInnerSize = slicePixelSize * (size - 1.0);\n\n float xOffset = 0.5 * sliceSize + texCoord.x * (1.0 - sliceSize);\n float yOffset = 0.5 * slicePixelSize + texCoord.y * sliceInnerSize;\n float zOffset = texCoord.z * (size - 1.0);\n\n float zSlice0 = floor(zOffset);\n float zSlice1 = zSlice0 + 1.0;\n float s0 = yOffset + (zSlice0 * sliceSize);\n float s1 = yOffset + (zSlice1 * sliceSize);\n vec4 slice0Color = texture2D(tex, vec2(xOffset, s0));\n vec4 slice1Color = texture2D(tex, vec2(xOffset, s1));\n\n return mix(slice0Color, slice1Color, zOffset - zSlice0);\n }uniform sampler2D s_texture; void main() { vec4 texel = texture2D(s_texture, sourceTextureCoordinate);vec4 inputTexel = texel;texel.rgb = ig_texture3D(lookup, texel.rgb, 33.0).rgb;\n\n // Component wise blending\n#define Blend(base, blend, funcf) vec3(funcf(base.r, blend.r), funcf(base.g, blend.g), funcf(base.b, blend.b))\n#define BlendOverlayf(base, blend) (base < 0.5 ? (2.0 * base * blend) : (1.0 - 2.0 * (1.0 - base) * (1.0 - blend)))\n#define BlendOverlay(base, blend) Blend(base, blend, BlendOverlayf)\n\n {\n // overlay gradient\n vec4 gradStart = vec4(vec3(0.125), 1.0);\n vec4 gradEnd = vec4(vec3(0.2588), 0.0);\n\n vec4 gradColor = mix(gradStart, gradEnd, 1.0 - textureCoordinate.y);\n //texel.rgb = gradColor.rgb * gradColor.a + (1.0 - gradColor.a) * texel.rgb;\n vec3 gradBlend = BlendOverlay(texel.rgb, gradColor.rgb);\n float gradOpac = 0.20 * gradColor.a;\n\n texel.rgb = gradOpac * gradBlend + (1.0 - gradOpac) * texel.rgb;\n } \ntexel.rgb = mix(inputTexel.rgb, texel.rgb, strength);\n\ngl_FragColor = texel;\n}" | |
}, | |
{ | |
"filter": "IGAdenFilter", | |
"fragmentShader": "texel.rgb = ig_texture3D(lookup, texel.rgb, 33.0).rgb;", | |
"filterName": "Aden", | |
"samplers": { | |
"lookup": "aden_map.png" | |
}, | |
"borderName": "filterBorderPlainWhite.png", | |
"vertexShader": "", | |
"fullVertexShader": "attribute vec3 a_position; attribute vec2 a_texCoord; uniform mat4 u_contentTransform; uniform mat4 u_texCoordTransform; varying vec2 textureCoordinate; varying vec2 sourceTextureCoordinate; void main() { gl_Position = u_contentTransform * vec4(a_position, 1.0); textureCoordinate = a_texCoord + vec2(0.5); vec4 texel = u_texCoordTransform * vec4(a_texCoord, 0.0, 1.0); sourceTextureCoordinate = texel.xy / texel.w + vec2(0.5); }", | |
"fullFragmentShader": "precision highp float;varying vec2 textureCoordinate; varying vec2 sourceTextureCoordinate;\n uniform float strength; \nuniform sampler2D lookup; \n// 'size' is the number of shades per channel (e.g., 65 for a 65x(65*65) color map)\n vec4 ig_texture3D(sampler2D tex, vec3 texCoord, float size) {\n float sliceSize = 1.0 / size;\n float slicePixelSize = sliceSize / size;\n float sliceInnerSize = slicePixelSize * (size - 1.0);\n\n float xOffset = 0.5 * sliceSize + texCoord.x * (1.0 - sliceSize);\n float yOffset = 0.5 * slicePixelSize + texCoord.y * sliceInnerSize;\n float zOffset = texCoord.z * (size - 1.0);\n\n float zSlice0 = floor(zOffset);\n float zSlice1 = zSlice0 + 1.0;\n float s0 = yOffset + (zSlice0 * sliceSize);\n float s1 = yOffset + (zSlice1 * sliceSize);\n vec4 slice0Color = texture2D(tex, vec2(xOffset, s0));\n vec4 slice1Color = texture2D(tex, vec2(xOffset, s1));\n\n return mix(slice0Color, slice1Color, zOffset - zSlice0);\n }uniform sampler2D s_texture; void main() { vec4 texel = texture2D(s_texture, sourceTextureCoordinate);vec4 inputTexel = texel;texel.rgb = ig_texture3D(lookup, texel.rgb, 33.0).rgb; \ntexel.rgb = mix(inputTexel.rgb, texel.rgb, strength);\n\ngl_FragColor = texel;\n}" | |
}, | |
{ | |
"filter": "IGPerpetuaFilter", | |
"fragmentShader": "// Component wise blending\n#define Blend(base, blend, funcf) vec3(funcf(base.r, blend.r), funcf(base.g, blend.g), funcf(base.b, blend.b))\n#define BlendOverlayf(base, blend) (base < 0.5 ? (2.0 * base * blend) : (1.0 - 2.0 * (1.0 - base) * (1.0 - blend)))\n#define BlendOverlay(base, blend) Blend(base, blend, BlendOverlayf)\n\n texel.rgb = ig_texture3D(lookup, texel.rgb, 33.0).rgb;\n\n {\n // grain texture overlay\n vec3 grain = texture2D(gradient, textureCoordinate).rgb;\n vec3 grained = BlendOverlay(texel.rgb, grain);\n texel.rgb = mix(texel.rgb, grained, 0.35);\n }", | |
"filterName": "Perpetua", | |
"samplers": { | |
"lookup": "perpetua_map.png", | |
"gradient": "perpetua_overlay.png" | |
}, | |
"borderName": "filterBorderPlainWhite.png", | |
"vertexShader": "", | |
"fullVertexShader": "attribute vec3 a_position; attribute vec2 a_texCoord; uniform mat4 u_contentTransform; uniform mat4 u_texCoordTransform; varying vec2 textureCoordinate; varying vec2 sourceTextureCoordinate; void main() { gl_Position = u_contentTransform * vec4(a_position, 1.0); textureCoordinate = a_texCoord + vec2(0.5); vec4 texel = u_texCoordTransform * vec4(a_texCoord, 0.0, 1.0); sourceTextureCoordinate = texel.xy / texel.w + vec2(0.5); }", | |
"fullFragmentShader": "precision highp float;varying vec2 textureCoordinate; varying vec2 sourceTextureCoordinate;\n uniform float strength; \nuniform sampler2D lookup; uniform sampler2D gradient; \n// 'size' is the number of shades per channel (e.g., 65 for a 65x(65*65) color map)\n vec4 ig_texture3D(sampler2D tex, vec3 texCoord, float size) {\n float sliceSize = 1.0 / size;\n float slicePixelSize = sliceSize / size;\n float sliceInnerSize = slicePixelSize * (size - 1.0);\n\n float xOffset = 0.5 * sliceSize + texCoord.x * (1.0 - sliceSize);\n float yOffset = 0.5 * slicePixelSize + texCoord.y * sliceInnerSize;\n float zOffset = texCoord.z * (size - 1.0);\n\n float zSlice0 = floor(zOffset);\n float zSlice1 = zSlice0 + 1.0;\n float s0 = yOffset + (zSlice0 * sliceSize);\n float s1 = yOffset + (zSlice1 * sliceSize);\n vec4 slice0Color = texture2D(tex, vec2(xOffset, s0));\n vec4 slice1Color = texture2D(tex, vec2(xOffset, s1));\n\n return mix(slice0Color, slice1Color, zOffset - zSlice0);\n }uniform sampler2D s_texture; void main() { vec4 texel = texture2D(s_texture, sourceTextureCoordinate);vec4 inputTexel = texel;// Component wise blending\n#define Blend(base, blend, funcf) vec3(funcf(base.r, blend.r), funcf(base.g, blend.g), funcf(base.b, blend.b))\n#define BlendOverlayf(base, blend) (base < 0.5 ? (2.0 * base * blend) : (1.0 - 2.0 * (1.0 - base) * (1.0 - blend)))\n#define BlendOverlay(base, blend) Blend(base, blend, BlendOverlayf)\n\n texel.rgb = ig_texture3D(lookup, texel.rgb, 33.0).rgb;\n\n {\n // grain texture overlay\n vec3 grain = texture2D(gradient, textureCoordinate).rgb;\n vec3 grained = BlendOverlay(texel.rgb, grain);\n texel.rgb = mix(texel.rgb, grained, 0.35);\n } \ntexel.rgb = mix(inputTexel.rgb, texel.rgb, strength);\n\ngl_FragColor = texel;\n}" | |
}, | |
{ | |
"filter": "IGAmaroFilter", | |
"fragmentShader": "vec3 bbTexel = texture2D(blackboard, textureCoordinate).rgb;\n\n texel.r = texture2D(overlay, vec2(bbTexel.r, texel.r)).r;\n texel.g = texture2D(overlay, vec2(bbTexel.g, texel.g)).g;\n texel.b = texture2D(overlay, vec2(bbTexel.b, texel.b)).b;\n\n vec3 mapped;\n mapped.r = texture2D(map, vec2(texel.r, .16666)).r;\n mapped.g = texture2D(map, vec2(texel.g, .5)).g;\n mapped.b = texture2D(map, vec2(texel.b, .83333)).b;\n\n texel.rgb = mapped;", | |
"filterName": "Amaro", | |
"samplers": { | |
"map": "amaroMap.png", | |
"overlay": "overlayMap.png", | |
"blackboard": "blackboard.png" | |
}, | |
"borderName": "amaroBorder.png", | |
"vertexShader": "", | |
"fullVertexShader": "attribute vec3 a_position; attribute vec2 a_texCoord; uniform mat4 u_contentTransform; uniform mat4 u_texCoordTransform; varying vec2 textureCoordinate; varying vec2 sourceTextureCoordinate; void main() { gl_Position = u_contentTransform * vec4(a_position, 1.0); textureCoordinate = a_texCoord + vec2(0.5); vec4 texel = u_texCoordTransform * vec4(a_texCoord, 0.0, 1.0); sourceTextureCoordinate = texel.xy / texel.w + vec2(0.5); }", | |
"fullFragmentShader": "precision mediump float;varying vec2 textureCoordinate; varying vec2 sourceTextureCoordinate;\n uniform float strength; \nuniform sampler2D map; uniform sampler2D overlay; uniform sampler2D blackboard; \nuniform sampler2D s_texture; void main() { vec4 texel = texture2D(s_texture, sourceTextureCoordinate);vec4 inputTexel = texel;vec3 bbTexel = texture2D(blackboard, textureCoordinate).rgb;\n\n texel.r = texture2D(overlay, vec2(bbTexel.r, texel.r)).r;\n texel.g = texture2D(overlay, vec2(bbTexel.g, texel.g)).g;\n texel.b = texture2D(overlay, vec2(bbTexel.b, texel.b)).b;\n\n vec3 mapped;\n mapped.r = texture2D(map, vec2(texel.r, .16666)).r;\n mapped.g = texture2D(map, vec2(texel.g, .5)).g;\n mapped.b = texture2D(map, vec2(texel.b, .83333)).b;\n\n texel.rgb = mapped; \ntexel.rgb = mix(inputTexel.rgb, texel.rgb, strength);\n\ngl_FragColor = texel;\n}" | |
}, | |
{ | |
"filter": "IGMayfairFilter", | |
"fragmentShader": "// saturation\n\n float luma = dot(texel.rgb, vec3(0.2125, 0.7154, 0.0721));\n texel.rgb = mix(vec3(luma), texel.rgb, 1.2);\n\n // curves\n\n vec2 lookup;\n lookup.y = .5;\n\n lookup.x = texel.r;\n texel.r = texture2D(map, lookup).r;\n\n lookup.x = texel.g;\n texel.g = texture2D(map, lookup).g;\n\n lookup.x = texel.b;\n texel.b = texture2D(map, lookup).b;\n\n // glow\n\n vec3 glowFieldTexel = texture2D(glowField, textureCoordinate).rgb;\n texel.rgb = vec3(texture2D(overlay, vec2(glowFieldTexel.r, texel.r)).r,\n texture2D(overlay, vec2(glowFieldTexel.g, texel.g)).g,\n texture2D(overlay, vec2(glowFieldTexel.b, texel.b)).b);\n\n // color\n\n lookup.x = texel.r;\n texel.r = texture2D(colorOverlay, lookup).r;\n\n lookup.x = texel.g;\n texel.g = texture2D(colorOverlay, lookup).g;\n\n lookup.x = texel.b;\n texel.b = texture2D(colorOverlay, lookup).b;", | |
"filterName": "Mayfair", | |
"samplers": { | |
"colorOverlay": "mayfairColorOverlay.png", | |
"map": "mayfairColorGradient.png", | |
"glowField": "mayfairGlowField.png", | |
"overlay": "mayfairOverlayMap100.png" | |
}, | |
"borderName": "mayfairBorder.png", | |
"vertexShader": "", | |
"fullVertexShader": "attribute vec3 a_position; attribute vec2 a_texCoord; uniform mat4 u_contentTransform; uniform mat4 u_texCoordTransform; varying vec2 textureCoordinate; varying vec2 sourceTextureCoordinate; void main() { gl_Position = u_contentTransform * vec4(a_position, 1.0); textureCoordinate = a_texCoord + vec2(0.5); vec4 texel = u_texCoordTransform * vec4(a_texCoord, 0.0, 1.0); sourceTextureCoordinate = texel.xy / texel.w + vec2(0.5); }", | |
"fullFragmentShader": "precision mediump float;varying vec2 textureCoordinate; varying vec2 sourceTextureCoordinate;\n uniform float strength; \nuniform sampler2D colorOverlay; uniform sampler2D map; uniform sampler2D glowField; uniform sampler2D overlay; \nuniform sampler2D s_texture; void main() { vec4 texel = texture2D(s_texture, sourceTextureCoordinate);vec4 inputTexel = texel;// saturation\n\n float luma = dot(texel.rgb, vec3(0.2125, 0.7154, 0.0721));\n texel.rgb = mix(vec3(luma), texel.rgb, 1.2);\n\n // curves\n\n vec2 lookup;\n lookup.y = .5;\n\n lookup.x = texel.r;\n texel.r = texture2D(map, lookup).r;\n\n lookup.x = texel.g;\n texel.g = texture2D(map, lookup).g;\n\n lookup.x = texel.b;\n texel.b = texture2D(map, lookup).b;\n\n // glow\n\n vec3 glowFieldTexel = texture2D(glowField, textureCoordinate).rgb;\n texel.rgb = vec3(texture2D(overlay, vec2(glowFieldTexel.r, texel.r)).r,\n texture2D(overlay, vec2(glowFieldTexel.g, texel.g)).g,\n texture2D(overlay, vec2(glowFieldTexel.b, texel.b)).b);\n\n // color\n\n lookup.x = texel.r;\n texel.r = texture2D(colorOverlay, lookup).r;\n\n lookup.x = texel.g;\n texel.g = texture2D(colorOverlay, lookup).g;\n\n lookup.x = texel.b;\n texel.b = texture2D(colorOverlay, lookup).b; \ntexel.rgb = mix(inputTexel.rgb, texel.rgb, strength);\n\ngl_FragColor = texel;\n}" | |
}, | |
{ | |
"filter": "IGRiseFilter", | |
"fragmentShader": "vec3 bbTexel = texture2D(blowout, textureCoordinate).rgb;\n\n texel.r = texture2D(overlay, vec2(bbTexel.r, texel.r)).r;\n texel.g = texture2D(overlay, vec2(bbTexel.g, texel.g)).g;\n texel.b = texture2D(overlay, vec2(bbTexel.b, texel.b)).b;\n\n vec3 mapped;\n mapped.r = texture2D(map, vec2(texel.r, .16666)).r;\n mapped.g = texture2D(map, vec2(texel.g, .5)).g;\n mapped.b = texture2D(map, vec2(texel.b, .83333)).b;\n\n texel.rgb = mapped;", | |
"filterName": "Rise", | |
"samplers": { | |
"blowout": "blackboard.png", | |
"map": "riseMap.png", | |
"overlay": "overlayMap.png" | |
}, | |
"borderName": "riseBorder.png", | |
"vertexShader": "", | |
"fullVertexShader": "attribute vec3 a_position; attribute vec2 a_texCoord; uniform mat4 u_contentTransform; uniform mat4 u_texCoordTransform; varying vec2 textureCoordinate; varying vec2 sourceTextureCoordinate; void main() { gl_Position = u_contentTransform * vec4(a_position, 1.0); textureCoordinate = a_texCoord + vec2(0.5); vec4 texel = u_texCoordTransform * vec4(a_texCoord, 0.0, 1.0); sourceTextureCoordinate = texel.xy / texel.w + vec2(0.5); }", | |
"fullFragmentShader": "precision mediump float;varying vec2 textureCoordinate; varying vec2 sourceTextureCoordinate;\n uniform float strength; \nuniform sampler2D blowout; uniform sampler2D map; uniform sampler2D overlay; \nuniform sampler2D s_texture; void main() { vec4 texel = texture2D(s_texture, sourceTextureCoordinate);vec4 inputTexel = texel;vec3 bbTexel = texture2D(blowout, textureCoordinate).rgb;\n\n texel.r = texture2D(overlay, vec2(bbTexel.r, texel.r)).r;\n texel.g = texture2D(overlay, vec2(bbTexel.g, texel.g)).g;\n texel.b = texture2D(overlay, vec2(bbTexel.b, texel.b)).b;\n\n vec3 mapped;\n mapped.r = texture2D(map, vec2(texel.r, .16666)).r;\n mapped.g = texture2D(map, vec2(texel.g, .5)).g;\n mapped.b = texture2D(map, vec2(texel.b, .83333)).b;\n\n texel.rgb = mapped; \ntexel.rgb = mix(inputTexel.rgb, texel.rgb, strength);\n\ngl_FragColor = texel;\n}" | |
}, | |
{ | |
"filter": "IGHudsonFilter", | |
"fragmentShader": "vec3 bbTexel = texture2D(blowout, textureCoordinate).rgb;\n\n texel.r = texture2D(overlay, vec2(bbTexel.r, texel.r)).r;\n texel.g = texture2D(overlay, vec2(bbTexel.g, texel.g)).g;\n texel.b = texture2D(overlay, vec2(bbTexel.b, texel.b)).b;\n\n vec3 mapped;\n mapped.r = texture2D(map, vec2(texel.r, .16666)).r;\n mapped.g = texture2D(map, vec2(texel.g, .5)).g;\n mapped.b = texture2D(map, vec2(texel.b, .83333)).b;\n\n texel.rgb = mapped;", | |
"filterName": "Hudson", | |
"samplers": { | |
"blowout": "hudsonBackground.pvr", | |
"map": "hudsonMap.png", | |
"overlay": "overlayMap.png" | |
}, | |
"borderName": "hudsonBorder.png", | |
"vertexShader": "", | |
"fullVertexShader": "attribute vec3 a_position; attribute vec2 a_texCoord; uniform mat4 u_contentTransform; uniform mat4 u_texCoordTransform; varying vec2 textureCoordinate; varying vec2 sourceTextureCoordinate; void main() { gl_Position = u_contentTransform * vec4(a_position, 1.0); textureCoordinate = a_texCoord + vec2(0.5); vec4 texel = u_texCoordTransform * vec4(a_texCoord, 0.0, 1.0); sourceTextureCoordinate = texel.xy / texel.w + vec2(0.5); }", | |
"fullFragmentShader": "precision mediump float;varying vec2 textureCoordinate; varying vec2 sourceTextureCoordinate;\n uniform float strength; \nuniform sampler2D blowout; uniform sampler2D map; uniform sampler2D overlay; \nuniform sampler2D s_texture; void main() { vec4 texel = texture2D(s_texture, sourceTextureCoordinate);vec4 inputTexel = texel;vec3 bbTexel = texture2D(blowout, textureCoordinate).rgb;\n\n texel.r = texture2D(overlay, vec2(bbTexel.r, texel.r)).r;\n texel.g = texture2D(overlay, vec2(bbTexel.g, texel.g)).g;\n texel.b = texture2D(overlay, vec2(bbTexel.b, texel.b)).b;\n\n vec3 mapped;\n mapped.r = texture2D(map, vec2(texel.r, .16666)).r;\n mapped.g = texture2D(map, vec2(texel.g, .5)).g;\n mapped.b = texture2D(map, vec2(texel.b, .83333)).b;\n\n texel.rgb = mapped; \ntexel.rgb = mix(inputTexel.rgb, texel.rgb, strength);\n\ngl_FragColor = texel;\n}" | |
}, | |
{ | |
"filter": "IGValenciaFilter", | |
"fragmentShader": "const mat3 saturateMatrix = mat3(1.1402,\n -0.0598,\n -0.061,\n -0.1174,\n 1.0826,\n -0.1186,\n -0.0228,\n -0.0228,\n 1.1772);\n\n const vec3 lumaCoeffs = vec3(.3, .59, .11);\n texel.rgb = vec3(texture2D(map, vec2(texel.r, .1666666)).r,\n texture2D(map, vec2(texel.g, .5)).g,\n texture2D(map, vec2(texel.b, .8333333)).b);\n\n texel.rgb = saturateMatrix * texel.rgb;\n\n float luma = dot(lumaCoeffs, texel.rgb);\n texel.rgb = vec3(texture2D(gradientMap, vec2(luma, texel.r)).r,\n texture2D(gradientMap, vec2(luma, texel.g)).g,\n texture2D(gradientMap, vec2(luma, texel.b)).b);", | |
"filterName": "Valencia", | |
"samplers": { | |
"map": "valenciaMap.png", | |
"gradientMap": "valenciaGradientMap.png" | |
}, | |
"borderName": "filterBorderPlainWhite.png", | |
"vertexShader": "", | |
"fullVertexShader": "attribute vec3 a_position; attribute vec2 a_texCoord; uniform mat4 u_contentTransform; uniform mat4 u_texCoordTransform; varying vec2 textureCoordinate; varying vec2 sourceTextureCoordinate; void main() { gl_Position = u_contentTransform * vec4(a_position, 1.0); textureCoordinate = a_texCoord + vec2(0.5); vec4 texel = u_texCoordTransform * vec4(a_texCoord, 0.0, 1.0); sourceTextureCoordinate = texel.xy / texel.w + vec2(0.5); }", | |
"fullFragmentShader": "precision mediump float;varying vec2 textureCoordinate; varying vec2 sourceTextureCoordinate;\n uniform float strength; \nuniform sampler2D map; uniform sampler2D gradientMap; \nuniform sampler2D s_texture; void main() { vec4 texel = texture2D(s_texture, sourceTextureCoordinate);vec4 inputTexel = texel;const mat3 saturateMatrix = mat3(1.1402,\n -0.0598,\n -0.061,\n -0.1174,\n 1.0826,\n -0.1186,\n -0.0228,\n -0.0228,\n 1.1772);\n\n const vec3 lumaCoeffs = vec3(.3, .59, .11);\n texel.rgb = vec3(texture2D(map, vec2(texel.r, .1666666)).r,\n texture2D(map, vec2(texel.g, .5)).g,\n texture2D(map, vec2(texel.b, .8333333)).b);\n\n texel.rgb = saturateMatrix * texel.rgb;\n\n float luma = dot(lumaCoeffs, texel.rgb);\n texel.rgb = vec3(texture2D(gradientMap, vec2(luma, texel.r)).r,\n texture2D(gradientMap, vec2(luma, texel.g)).g,\n texture2D(gradientMap, vec2(luma, texel.b)).b); \ntexel.rgb = mix(inputTexel.rgb, texel.rgb, strength);\n\ngl_FragColor = texel;\n}" | |
}, | |
{ | |
"filter": "IGXpro2Filter", | |
"fragmentShader": "vec2 lookup;\n vec3 sampled;\n lookup.y = .5;\n lookup.x = texel.r;\n sampled.r = texture2D(vignetteMap, lookup).r;\n lookup.x = texel.g;\n sampled.g = texture2D(vignetteMap, lookup).g;\n lookup.x = texel.b;\n sampled.b = texture2D(vignetteMap, lookup).b;\n\n vec2 tc = (2.0 * textureCoordinate) - 1.0;\n float d = dot(tc, tc);\n float value = smoothstep(0.0, 1.25, pow(d, 1.35)/1.65);\n texel.rgb = mix(texel.rgb, sampled, value);\n\n lookup.y = 0.5;\n lookup.x = texel.r;\n texel.r = texture2D(xproMap, lookup).r;\n lookup.x = texel.g;\n texel.g = texture2D(xproMap, lookup).g;\n lookup.x = texel.b;\n texel.b = texture2D(xproMap, lookup).b;", | |
"filterName": "X-Pro II", | |
"samplers": { | |
"xproMap": "xproMap.png", | |
"vignetteMap": "plusDarker.png" | |
}, | |
"borderName": "XPro2Border.png", | |
"vertexShader": "", | |
"fullVertexShader": "attribute vec3 a_position; attribute vec2 a_texCoord; uniform mat4 u_contentTransform; uniform mat4 u_texCoordTransform; varying vec2 textureCoordinate; varying vec2 sourceTextureCoordinate; void main() { gl_Position = u_contentTransform * vec4(a_position, 1.0); textureCoordinate = a_texCoord + vec2(0.5); vec4 texel = u_texCoordTransform * vec4(a_texCoord, 0.0, 1.0); sourceTextureCoordinate = texel.xy / texel.w + vec2(0.5); }", | |
"fullFragmentShader": "precision mediump float;varying vec2 textureCoordinate; varying vec2 sourceTextureCoordinate;\n uniform float strength; \nuniform sampler2D xproMap; uniform sampler2D vignetteMap; \nuniform sampler2D s_texture; void main() { vec4 texel = texture2D(s_texture, sourceTextureCoordinate);vec4 inputTexel = texel;vec2 lookup;\n vec3 sampled;\n lookup.y = .5;\n lookup.x = texel.r;\n sampled.r = texture2D(vignetteMap, lookup).r;\n lookup.x = texel.g;\n sampled.g = texture2D(vignetteMap, lookup).g;\n lookup.x = texel.b;\n sampled.b = texture2D(vignetteMap, lookup).b;\n\n vec2 tc = (2.0 * textureCoordinate) - 1.0;\n float d = dot(tc, tc);\n float value = smoothstep(0.0, 1.25, pow(d, 1.35)/1.65);\n texel.rgb = mix(texel.rgb, sampled, value);\n\n lookup.y = 0.5;\n lookup.x = texel.r;\n texel.r = texture2D(xproMap, lookup).r;\n lookup.x = texel.g;\n texel.g = texture2D(xproMap, lookup).g;\n lookup.x = texel.b;\n texel.b = texture2D(xproMap, lookup).b; \ntexel.rgb = mix(inputTexel.rgb, texel.rgb, strength);\n\ngl_FragColor = texel;\n}" | |
}, | |
{ | |
"filter": "IGSierraFilter", | |
"fragmentShader": "vec3 color = texel.rgb;\n vec3 vignetteSample = texture2D(vignette, textureCoordinate).rgb;\n\n color.r = texture2D(overlay, vec2(vignetteSample.r, color.r)).r;\n color.g = texture2D(overlay, vec2(vignetteSample.g, color.g)).g;\n color.b = texture2D(overlay, vec2(vignetteSample.b, color.b)).b;\n\n vec3 smokeSample = texture2D(smoke, textureCoordinate).rgb;\n color.r = texture2D(softLight, vec2(smokeSample.r, color.r)).r;\n color.g = texture2D(softLight, vec2(smokeSample.g, color.g)).g;\n color.b = texture2D(softLight, vec2(smokeSample.b, color.b)).b;\n\n\n vec2 mapSample;\n mapSample.y = 0.5;\n mapSample.x = color.r;\n color.r = texture2D(map, mapSample).r;\n mapSample.x = color.g;\n color.g = texture2D(map, mapSample).g;\n mapSample.x = color.b;\n color.b = texture2D(map, mapSample).b;\n\n texel.rgb = color;", | |
"filterName": "Sierra", | |
"samplers": { | |
"softLight": "softLight100.png", | |
"smoke": "sierraSmoke.png", | |
"map": "sierraMap.png", | |
"vignette": "sierraVignette.png", | |
"overlay": "overlayMap.png" | |
}, | |
"borderName": "sierraBorder.png", | |
"vertexShader": "", | |
"fullVertexShader": "attribute vec3 a_position; attribute vec2 a_texCoord; uniform mat4 u_contentTransform; uniform mat4 u_texCoordTransform; varying vec2 textureCoordinate; varying vec2 sourceTextureCoordinate; void main() { gl_Position = u_contentTransform * vec4(a_position, 1.0); textureCoordinate = a_texCoord + vec2(0.5); vec4 texel = u_texCoordTransform * vec4(a_texCoord, 0.0, 1.0); sourceTextureCoordinate = texel.xy / texel.w + vec2(0.5); }", | |
"fullFragmentShader": "precision mediump float;varying vec2 textureCoordinate; varying vec2 sourceTextureCoordinate;\n uniform float strength; \nuniform sampler2D softLight; uniform sampler2D smoke; uniform sampler2D map; uniform sampler2D vignette; uniform sampler2D overlay; \nuniform sampler2D s_texture; void main() { vec4 texel = texture2D(s_texture, sourceTextureCoordinate);vec4 inputTexel = texel;vec3 color = texel.rgb;\n vec3 vignetteSample = texture2D(vignette, textureCoordinate).rgb;\n\n color.r = texture2D(overlay, vec2(vignetteSample.r, color.r)).r;\n color.g = texture2D(overlay, vec2(vignetteSample.g, color.g)).g;\n color.b = texture2D(overlay, vec2(vignetteSample.b, color.b)).b;\n\n vec3 smokeSample = texture2D(smoke, textureCoordinate).rgb;\n color.r = texture2D(softLight, vec2(smokeSample.r, color.r)).r;\n color.g = texture2D(softLight, vec2(smokeSample.g, color.g)).g;\n color.b = texture2D(softLight, vec2(smokeSample.b, color.b)).b;\n\n\n vec2 mapSample;\n mapSample.y = 0.5;\n mapSample.x = color.r;\n color.r = texture2D(map, mapSample).r;\n mapSample.x = color.g;\n color.g = texture2D(map, mapSample).g;\n mapSample.x = color.b;\n color.b = texture2D(map, mapSample).b;\n\n texel.rgb = color; \ntexel.rgb = mix(inputTexel.rgb, texel.rgb, strength);\n\ngl_FragColor = texel;\n}" | |
}, | |
{ | |
"filter": "IGWillowFilter", | |
"fragmentShader": "// Desaturate\n texel.rgb = vec3(dot(texel.rgb, vec3(.299, .587, .114)));\n\n // Overlay the glow map\n vec3 glowMapTexel = texture2D(glowMap, textureCoordinate).rgb;\n\n texel.r = texture2D(overlayMap, vec2(texel.r, glowMapTexel.r)).r;\n texel.g = texture2D(overlayMap, vec2(texel.g, glowMapTexel.g)).g;\n texel.b = texture2D(overlayMap, vec2(texel.b, glowMapTexel.b)).b;\n\n // Soft light the vignette\n vec3 vignetteTexel = texture2D(vignette, textureCoordinate).rgb;\n\n // Add the border, if necessary\n vec3 borderShade = vec3(0.0,0.0,0.0);\n\n // Only apply border to the edge pixels, within 20/1024 (0.01953125) of the image's edge\n // This constant cooresponds to a 20 pixel border in the original 1024x1024 assets (lenardot)\n // left edge\n if (textureCoordinate.x <= 0.01953125) {\n float normalized = textureCoordinate.x / 0.01953125;\n borderShade += texture2D(borderTexture, vec2(normalized, 0.5)).rgb;\n }\n // right edge\n if (textureCoordinate.x >= 0.98046875) {\n float normalized = (1.0 - textureCoordinate.x) / 0.01953125;\n borderShade += texture2D(borderTexture, vec2(normalized, 0.5)).rgb;\n }\n // bottom edge\n if (textureCoordinate.y <= 0.01953125) {\n float normalized = textureCoordinate.y / 0.01953125;\n borderShade += texture2D(borderTexture, vec2(normalized, 0.5)).rgb;\n }\n // top edge\n if (textureCoordinate.y >= 0.98046875) {\n float normalized = (1.0 - textureCoordinate.y) / 0.01953125;\n borderShade += texture2D(borderTexture, vec2(normalized, 0.5)).rgb;\n }\n\n vignetteTexel.r = vignetteTexel.r + borderShade.r;\n vignetteTexel.g = vignetteTexel.g + borderShade.g;\n vignetteTexel.b = vignetteTexel.b + borderShade.b;\n\n texel.r = texture2D(softLightMap, vec2(texel.r, vignetteTexel.r)).r;\n texel.g = texture2D(softLightMap, vec2(texel.g, vignetteTexel.g)).g;\n texel.b = texture2D(softLightMap, vec2(texel.b, vignetteTexel.b)).b;\n\n // Curves\n vec2 lookup;\n lookup.y = 0.5;\n lookup.x = texel.r; // Can do only one lookup because it's monochromatic at this pt. r=g=b\n texel.rgb = texture2D(map, lookup).rgb;", | |
"filterName": "Willow", | |
"samplers": { | |
"glowMap": "glowField.png", | |
"borderTexture": "borderTexture.png", | |
"map": "willowMap.png", | |
"softLightMap": "willowSoftLight100.png", | |
"overlayMap": "overlayMap81.png", | |
"vignette": "willowVignette.png" | |
}, | |
"borderName": "willowBorder.png", | |
"vertexShader": "", | |
"fullVertexShader": "attribute vec3 a_position; attribute vec2 a_texCoord; uniform mat4 u_contentTransform; uniform mat4 u_texCoordTransform; varying vec2 textureCoordinate; varying vec2 sourceTextureCoordinate; void main() { gl_Position = u_contentTransform * vec4(a_position, 1.0); textureCoordinate = a_texCoord + vec2(0.5); vec4 texel = u_texCoordTransform * vec4(a_texCoord, 0.0, 1.0); sourceTextureCoordinate = texel.xy / texel.w + vec2(0.5); }", | |
"fullFragmentShader": "precision mediump float;varying vec2 textureCoordinate; varying vec2 sourceTextureCoordinate;\n uniform float strength; \nuniform sampler2D glowMap; uniform sampler2D borderTexture; uniform sampler2D map; uniform sampler2D softLightMap; uniform sampler2D overlayMap; uniform sampler2D vignette; \nuniform sampler2D s_texture; void main() { vec4 texel = texture2D(s_texture, sourceTextureCoordinate);vec4 inputTexel = texel;// Desaturate\n texel.rgb = vec3(dot(texel.rgb, vec3(.299, .587, .114)));\n\n // Overlay the glow map\n vec3 glowMapTexel = texture2D(glowMap, textureCoordinate).rgb;\n\n texel.r = texture2D(overlayMap, vec2(texel.r, glowMapTexel.r)).r;\n texel.g = texture2D(overlayMap, vec2(texel.g, glowMapTexel.g)).g;\n texel.b = texture2D(overlayMap, vec2(texel.b, glowMapTexel.b)).b;\n\n // Soft light the vignette\n vec3 vignetteTexel = texture2D(vignette, textureCoordinate).rgb;\n\n // Add the border, if necessary\n vec3 borderShade = vec3(0.0,0.0,0.0);\n\n // Only apply border to the edge pixels, within 20/1024 (0.01953125) of the image's edge\n // This constant cooresponds to a 20 pixel border in the original 1024x1024 assets (lenardot)\n // left edge\n if (textureCoordinate.x <= 0.01953125) {\n float normalized = textureCoordinate.x / 0.01953125;\n borderShade += texture2D(borderTexture, vec2(normalized, 0.5)).rgb;\n }\n // right edge\n if (textureCoordinate.x >= 0.98046875) {\n float normalized = (1.0 - textureCoordinate.x) / 0.01953125;\n borderShade += texture2D(borderTexture, vec2(normalized, 0.5)).rgb;\n }\n // bottom edge\n if (textureCoordinate.y <= 0.01953125) {\n float normalized = textureCoordinate.y / 0.01953125;\n borderShade += texture2D(borderTexture, vec2(normalized, 0.5)).rgb;\n }\n // top edge\n if (textureCoordinate.y >= 0.98046875) {\n float normalized = (1.0 - textureCoordinate.y) / 0.01953125;\n borderShade += texture2D(borderTexture, vec2(normalized, 0.5)).rgb;\n }\n\n vignetteTexel.r = vignetteTexel.r + borderShade.r;\n vignetteTexel.g = vignetteTexel.g + borderShade.g;\n vignetteTexel.b = vignetteTexel.b + borderShade.b;\n\n texel.r = texture2D(softLightMap, vec2(texel.r, vignetteTexel.r)).r;\n texel.g = texture2D(softLightMap, vec2(texel.g, vignetteTexel.g)).g;\n texel.b = texture2D(softLightMap, vec2(texel.b, vignetteTexel.b)).b;\n\n // Curves\n vec2 lookup;\n lookup.y = 0.5;\n lookup.x = texel.r; // Can do only one lookup because it's monochromatic at this pt. r=g=b\n texel.rgb = texture2D(map, lookup).rgb; \ntexel.rgb = mix(vec3(dot(inputTexel.rgb, vec3(0.299, 0.587, 0.114))), texel.rgb, strength);\n\ngl_FragColor = texel;\n}" | |
}, | |
{ | |
"filter": "IGLoFiFilter", | |
"fragmentShader": "vec2 red = vec2(texel.r, 0.16666);\n vec2 green = vec2(texel.g, 0.5);\n vec2 blue = vec2(texel.b, 0.83333);\n\n texel.rgb = vec3(texture2D(lomoMap, red).r,\n texture2D(lomoMap, green).g,\n texture2D(lomoMap, blue).b);\n\n vec2 tc = (2.0 * textureCoordinate) - 1.0;\n float d = dot(tc, tc);\n vec2 lookup = vec2(d, texel.r);\n texel.r = texture2D(vignetteMap, lookup).r;\n lookup.y = texel.g;\n texel.g = texture2D(vignetteMap, lookup).g;\n lookup.y = texel.b;\n texel.b = texture2D(vignetteMap, lookup).b;", | |
"filterName": "Lo-Fi", | |
"samplers": { | |
"lomoMap": "lomoMap.png", | |
"vignetteMap": "blackOverlayMap.png" | |
}, | |
"borderName": "lomoBorder.png", | |
"vertexShader": "", | |
"fullVertexShader": "attribute vec3 a_position; attribute vec2 a_texCoord; uniform mat4 u_contentTransform; uniform mat4 u_texCoordTransform; varying vec2 textureCoordinate; varying vec2 sourceTextureCoordinate; void main() { gl_Position = u_contentTransform * vec4(a_position, 1.0); textureCoordinate = a_texCoord + vec2(0.5); vec4 texel = u_texCoordTransform * vec4(a_texCoord, 0.0, 1.0); sourceTextureCoordinate = texel.xy / texel.w + vec2(0.5); }", | |
"fullFragmentShader": "precision mediump float;varying vec2 textureCoordinate; varying vec2 sourceTextureCoordinate;\n uniform float strength; \nuniform sampler2D lomoMap; uniform sampler2D vignetteMap; \nuniform sampler2D s_texture; void main() { vec4 texel = texture2D(s_texture, sourceTextureCoordinate);vec4 inputTexel = texel;vec2 red = vec2(texel.r, 0.16666);\n vec2 green = vec2(texel.g, 0.5);\n vec2 blue = vec2(texel.b, 0.83333);\n\n texel.rgb = vec3(texture2D(lomoMap, red).r,\n texture2D(lomoMap, green).g,\n texture2D(lomoMap, blue).b);\n\n vec2 tc = (2.0 * textureCoordinate) - 1.0;\n float d = dot(tc, tc);\n vec2 lookup = vec2(d, texel.r);\n texel.r = texture2D(vignetteMap, lookup).r;\n lookup.y = texel.g;\n texel.g = texture2D(vignetteMap, lookup).g;\n lookup.y = texel.b;\n texel.b = texture2D(vignetteMap, lookup).b; \ntexel.rgb = mix(inputTexel.rgb, texel.rgb, strength);\n\ngl_FragColor = texel;\n}" | |
}, | |
{ | |
"filter": "IGEarlybirdFilter", | |
"fragmentShader": "const mat3 saturate = mat3(1.210300,\n -0.089700,\n -0.091000,\n -0.176100,\n 1.123900,\n -0.177400,\n -0.034200,\n -0.034200,\n 1.265800);\n\n const vec3 rgbPrime = vec3(0.25098, 0.14640522, 0.0);\n const vec3 desaturate = vec3(.3, .59, .11);\n\n vec2 lookup;\n lookup.y = 0.5;\n\n lookup.x = texel.r;\n texel.r = texture2D(curves, lookup).r;\n\n lookup.x = texel.g;\n texel.g = texture2D(curves, lookup).g;\n\n lookup.x = texel.b;\n texel.b = texture2D(curves, lookup).b;\n\n float desaturatedColor;\n vec3 result;\n desaturatedColor = dot(desaturate, texel.rgb);\n\n\n lookup.x = desaturatedColor;\n result.r = texture2D(overlayMap, lookup).r;\n lookup.x = desaturatedColor;\n result.g = texture2D(overlayMap, lookup).g;\n lookup.x = desaturatedColor;\n result.b = texture2D(overlayMap, lookup).b;\n\n texel.rgb = saturate * mix(texel.rgb, result, .5);\n\n vec2 tc = (2.0 * textureCoordinate) - 1.0;\n float d = dot(tc, tc);\n\n vec3 sampled;\n lookup.y = .5;\n\n lookup.x = texel.r;\n sampled.r = texture2D(vignetteMap, lookup).r;\n\n lookup.x = texel.g;\n sampled.g = texture2D(vignetteMap, lookup).g;\n\n lookup.x = texel.b;\n sampled.b = texture2D(vignetteMap, lookup).b;\n\n float value = smoothstep(0.0, 1.25, pow(d, 1.35)/1.65);\n texel.rgb = mix(texel.rgb, sampled, value);\n\n lookup.x = texel.r;\n sampled.r = texture2D(blowout, lookup).r;\n lookup.x = texel.g;\n sampled.g = texture2D(blowout, lookup).g;\n lookup.x = texel.b;\n sampled.b = texture2D(blowout, lookup).b;\n texel.rgb = mix(sampled, texel.rgb, value);\n\n\n lookup.x = texel.r;\n texel.r = texture2D(earlybirdMap, lookup).r;\n lookup.x = texel.g;\n texel.g = texture2D(earlybirdMap, lookup).g;\n lookup.x = texel.b;\n texel.b = texture2D(earlybirdMap, lookup).b;", | |
"filterName": "Earlybird", | |
"samplers": { | |
"blowout": "earlybirdBlowout.png", | |
"earlybirdMap": "earlybirdMap.png", | |
"curves": "earlyBirdCurves.png", | |
"overlayMap": "earlybirdOverlayMap.png", | |
"vignetteMap": "plusDarker.png" | |
}, | |
"borderName": "earlybirdBorder.png", | |
"vertexShader": "", | |
"fullVertexShader": "attribute vec3 a_position; attribute vec2 a_texCoord; uniform mat4 u_contentTransform; uniform mat4 u_texCoordTransform; varying vec2 textureCoordinate; varying vec2 sourceTextureCoordinate; void main() { gl_Position = u_contentTransform * vec4(a_position, 1.0); textureCoordinate = a_texCoord + vec2(0.5); vec4 texel = u_texCoordTransform * vec4(a_texCoord, 0.0, 1.0); sourceTextureCoordinate = texel.xy / texel.w + vec2(0.5); }", | |
"fullFragmentShader": "precision mediump float;varying vec2 textureCoordinate; varying vec2 sourceTextureCoordinate;\n uniform float strength; \nuniform sampler2D blowout; uniform sampler2D earlybirdMap; uniform sampler2D curves; uniform sampler2D overlayMap; uniform sampler2D vignetteMap; \nuniform sampler2D s_texture; void main() { vec4 texel = texture2D(s_texture, sourceTextureCoordinate);vec4 inputTexel = texel;const mat3 saturate = mat3(1.210300,\n -0.089700,\n -0.091000,\n -0.176100,\n 1.123900,\n -0.177400,\n -0.034200,\n -0.034200,\n 1.265800);\n\n const vec3 rgbPrime = vec3(0.25098, 0.14640522, 0.0);\n const vec3 desaturate = vec3(.3, .59, .11);\n\n vec2 lookup;\n lookup.y = 0.5;\n\n lookup.x = texel.r;\n texel.r = texture2D(curves, lookup).r;\n\n lookup.x = texel.g;\n texel.g = texture2D(curves, lookup).g;\n\n lookup.x = texel.b;\n texel.b = texture2D(curves, lookup).b;\n\n float desaturatedColor;\n vec3 result;\n desaturatedColor = dot(desaturate, texel.rgb);\n\n\n lookup.x = desaturatedColor;\n result.r = texture2D(overlayMap, lookup).r;\n lookup.x = desaturatedColor;\n result.g = texture2D(overlayMap, lookup).g;\n lookup.x = desaturatedColor;\n result.b = texture2D(overlayMap, lookup).b;\n\n texel.rgb = saturate * mix(texel.rgb, result, .5);\n\n vec2 tc = (2.0 * textureCoordinate) - 1.0;\n float d = dot(tc, tc);\n\n vec3 sampled;\n lookup.y = .5;\n\n lookup.x = texel.r;\n sampled.r = texture2D(vignetteMap, lookup).r;\n\n lookup.x = texel.g;\n sampled.g = texture2D(vignetteMap, lookup).g;\n\n lookup.x = texel.b;\n sampled.b = texture2D(vignetteMap, lookup).b;\n\n float value = smoothstep(0.0, 1.25, pow(d, 1.35)/1.65);\n texel.rgb = mix(texel.rgb, sampled, value);\n\n lookup.x = texel.r;\n sampled.r = texture2D(blowout, lookup).r;\n lookup.x = texel.g;\n sampled.g = texture2D(blowout, lookup).g;\n lookup.x = texel.b;\n sampled.b = texture2D(blowout, lookup).b;\n texel.rgb = mix(sampled, texel.rgb, value);\n\n\n lookup.x = texel.r;\n texel.r = texture2D(earlybirdMap, lookup).r;\n lookup.x = texel.g;\n texel.g = texture2D(earlybirdMap, lookup).g;\n lookup.x = texel.b;\n texel.b = texture2D(earlybirdMap, lookup).b; \ntexel.rgb = mix(inputTexel.rgb, texel.rgb, strength);\n\ngl_FragColor = texel;\n}" | |
}, | |
{ | |
"filter": "IGBrannanFilter", | |
"fragmentShader": "mat3 saturateMatrix = mat3(1.105150,\n -0.044850,\n -0.046000,\n -0.088050,\n 1.061950,\n -0.089200,\n -0.017100,\n -0.017100,\n 1.132900);\n\n vec3 luma = vec3(.3, .59, .11);\n\n vec2 lookup;\n lookup.y = 0.5;\n lookup.x = texel.r;\n texel.r = texture2D(brannanMap, lookup).r;\n lookup.x = texel.g;\n texel.g = texture2D(brannanMap, lookup).g;\n lookup.x = texel.b;\n texel.b = texture2D(brannanMap, lookup).b;\n\n texel.rgb = saturateMatrix * texel.rgb;\n\n\n vec2 tc = (2.0 * textureCoordinate) - 1.0;\n float d = dot(tc, tc);\n vec3 sampled;\n lookup.y = 0.5;\n lookup.x = texel.r;\n sampled.r = texture2D(blowout, lookup).r;\n lookup.x = texel.g;\n sampled.g = texture2D(blowout, lookup).g;\n lookup.x = texel.b;\n sampled.b = texture2D(blowout, lookup).b;\n float value = smoothstep(0.0, 1.0, d);\n texel.rgb = mix(sampled, texel.rgb, value);\n\n lookup.x = texel.r;\n texel.r = texture2D(contrast, lookup).r;\n lookup.x = texel.g;\n texel.g = texture2D(contrast, lookup).g;\n lookup.x = texel.b;\n texel.b = texture2D(contrast, lookup).b;\n\n\n lookup.x = dot(texel.rgb, luma);\n texel.rgb = mix(texture2D(lumaMap, lookup).rgb, texel.rgb, .5);\n\n lookup.x = texel.r;\n texel.r = texture2D(screenMap, lookup).r;\n lookup.x = texel.g;\n texel.g = texture2D(screenMap, lookup).g;\n lookup.x = texel.b;\n texel.b = texture2D(screenMap, lookup).b;", | |
"filterName": "Brannan", | |
"samplers": { | |
"contrast": "brannanContrast.png", | |
"lumaMap": "brannanLuma.png", | |
"screenMap": "brannanScreen.png", | |
"blowout": "brannanBlowout.png", | |
"brannanMap": "brannanProcess.png" | |
}, | |
"borderName": "brannanBorder.png", | |
"vertexShader": "", | |
"fullVertexShader": "attribute vec3 a_position; attribute vec2 a_texCoord; uniform mat4 u_contentTransform; uniform mat4 u_texCoordTransform; varying vec2 textureCoordinate; varying vec2 sourceTextureCoordinate; void main() { gl_Position = u_contentTransform * vec4(a_position, 1.0); textureCoordinate = a_texCoord + vec2(0.5); vec4 texel = u_texCoordTransform * vec4(a_texCoord, 0.0, 1.0); sourceTextureCoordinate = texel.xy / texel.w + vec2(0.5); }", | |
"fullFragmentShader": "precision mediump float;varying vec2 textureCoordinate; varying vec2 sourceTextureCoordinate;\n uniform float strength; \nuniform sampler2D contrast; uniform sampler2D lumaMap; uniform sampler2D screenMap; uniform sampler2D blowout; uniform sampler2D brannanMap; \nuniform sampler2D s_texture; void main() { vec4 texel = texture2D(s_texture, sourceTextureCoordinate);vec4 inputTexel = texel;mat3 saturateMatrix = mat3(1.105150,\n -0.044850,\n -0.046000,\n -0.088050,\n 1.061950,\n -0.089200,\n -0.017100,\n -0.017100,\n 1.132900);\n\n vec3 luma = vec3(.3, .59, .11);\n\n vec2 lookup;\n lookup.y = 0.5;\n lookup.x = texel.r;\n texel.r = texture2D(brannanMap, lookup).r;\n lookup.x = texel.g;\n texel.g = texture2D(brannanMap, lookup).g;\n lookup.x = texel.b;\n texel.b = texture2D(brannanMap, lookup).b;\n\n texel.rgb = saturateMatrix * texel.rgb;\n\n\n vec2 tc = (2.0 * textureCoordinate) - 1.0;\n float d = dot(tc, tc);\n vec3 sampled;\n lookup.y = 0.5;\n lookup.x = texel.r;\n sampled.r = texture2D(blowout, lookup).r;\n lookup.x = texel.g;\n sampled.g = texture2D(blowout, lookup).g;\n lookup.x = texel.b;\n sampled.b = texture2D(blowout, lookup).b;\n float value = smoothstep(0.0, 1.0, d);\n texel.rgb = mix(sampled, texel.rgb, value);\n\n lookup.x = texel.r;\n texel.r = texture2D(contrast, lookup).r;\n lookup.x = texel.g;\n texel.g = texture2D(contrast, lookup).g;\n lookup.x = texel.b;\n texel.b = texture2D(contrast, lookup).b;\n\n\n lookup.x = dot(texel.rgb, luma);\n texel.rgb = mix(texture2D(lumaMap, lookup).rgb, texel.rgb, .5);\n\n lookup.x = texel.r;\n texel.r = texture2D(screenMap, lookup).r;\n lookup.x = texel.g;\n texel.g = texture2D(screenMap, lookup).g;\n lookup.x = texel.b;\n texel.b = texture2D(screenMap, lookup).b; \ntexel.rgb = mix(inputTexel.rgb, texel.rgb, strength);\n\ngl_FragColor = texel;\n}" | |
}, | |
{ | |
"filter": "IGInkwellFilter", | |
"fragmentShader": "texel.rgb = vec3(dot(vec3(0.3, 0.6, 0.1), texel.rgb));\n texel.rgb = vec3(texture2D(map, vec2(texel.r, .16666)).r);", | |
"filterName": "Inkwell", | |
"samplers": { | |
"map": "inkwellMap.png" | |
}, | |
"borderName": "filterBorderPlainWhite.png", | |
"vertexShader": "", | |
"fullVertexShader": "attribute vec3 a_position; attribute vec2 a_texCoord; uniform mat4 u_contentTransform; uniform mat4 u_texCoordTransform; varying vec2 textureCoordinate; varying vec2 sourceTextureCoordinate; void main() { gl_Position = u_contentTransform * vec4(a_position, 1.0); textureCoordinate = a_texCoord + vec2(0.5); vec4 texel = u_texCoordTransform * vec4(a_texCoord, 0.0, 1.0); sourceTextureCoordinate = texel.xy / texel.w + vec2(0.5); }", | |
"fullFragmentShader": "precision mediump float;varying vec2 textureCoordinate; varying vec2 sourceTextureCoordinate;\n uniform float strength; \nuniform sampler2D map; \nuniform sampler2D s_texture; void main() { vec4 texel = texture2D(s_texture, sourceTextureCoordinate);vec4 inputTexel = texel;texel.rgb = vec3(dot(vec3(0.3, 0.6, 0.1), texel.rgb));\n texel.rgb = vec3(texture2D(map, vec2(texel.r, .16666)).r); \ntexel.rgb = mix(vec3(dot(inputTexel.rgb, vec3(0.299, 0.587, 0.114))), texel.rgb, strength);\n\ngl_FragColor = texel;\n}" | |
}, | |
{ | |
"filter": "IGHefeFilter", | |
"fragmentShader": "vec3 edge = texture2D(edgeBurn, textureCoordinate).rgb;\n texel.rgb = texel.rgb * edge;\n\n texel.rgb = vec3(texture2D(map, vec2(texel.r, .16666)).r,\n texture2D(map, vec2(texel.g, .5)).g,\n texture2D(map, vec2(texel.b, .83333)).b);\n\n vec3 luma = vec3(.30, .59, .11);\n vec3 gradSample = texture2D(gradMap, vec2(dot(luma, texel.rgb), .5)).rgb;\n vec3 final = vec3(texture2D(softLight, vec2(gradSample.r, texel.r)).r,\n texture2D(softLight, vec2(gradSample.g, texel.g)).g,\n texture2D(softLight, vec2(gradSample.b, texel.b)).b);\n\n vec3 metal = texture2D(hefeMetal, textureCoordinate).rgb;\n vec3 metaled = vec3(texture2D(softLight, vec2(metal.r, final.r)).r,\n texture2D(softLight, vec2(metal.g, final.g)).g,\n texture2D(softLight, vec2(metal.b, final.b)).b);\n\n texel.rgb = metaled;", | |
"filterName": "Hefe", | |
"samplers": { | |
"edgeBurn": "edgeBurn.pvr", | |
"softLight": "hefeSoftLight.png", | |
"map": "hefeMap.png", | |
"hefeMetal": "hefeMetal.pvr", | |
"gradMap": "hefeGradientMap.png" | |
}, | |
"borderName": "hefeBorder.png", | |
"vertexShader": "", | |
"fullVertexShader": "attribute vec3 a_position; attribute vec2 a_texCoord; uniform mat4 u_contentTransform; uniform mat4 u_texCoordTransform; varying vec2 textureCoordinate; varying vec2 sourceTextureCoordinate; void main() { gl_Position = u_contentTransform * vec4(a_position, 1.0); textureCoordinate = a_texCoord + vec2(0.5); vec4 texel = u_texCoordTransform * vec4(a_texCoord, 0.0, 1.0); sourceTextureCoordinate = texel.xy / texel.w + vec2(0.5); }", | |
"fullFragmentShader": "precision mediump float;varying vec2 textureCoordinate; varying vec2 sourceTextureCoordinate;\n uniform float strength; \nuniform sampler2D edgeBurn; uniform sampler2D softLight; uniform sampler2D map; uniform sampler2D hefeMetal; uniform sampler2D gradMap; \nuniform sampler2D s_texture; void main() { vec4 texel = texture2D(s_texture, sourceTextureCoordinate);vec4 inputTexel = texel;vec3 edge = texture2D(edgeBurn, textureCoordinate).rgb;\n texel.rgb = texel.rgb * edge;\n\n texel.rgb = vec3(texture2D(map, vec2(texel.r, .16666)).r,\n texture2D(map, vec2(texel.g, .5)).g,\n texture2D(map, vec2(texel.b, .83333)).b);\n\n vec3 luma = vec3(.30, .59, .11);\n vec3 gradSample = texture2D(gradMap, vec2(dot(luma, texel.rgb), .5)).rgb;\n vec3 final = vec3(texture2D(softLight, vec2(gradSample.r, texel.r)).r,\n texture2D(softLight, vec2(gradSample.g, texel.g)).g,\n texture2D(softLight, vec2(gradSample.b, texel.b)).b);\n\n vec3 metal = texture2D(hefeMetal, textureCoordinate).rgb;\n vec3 metaled = vec3(texture2D(softLight, vec2(metal.r, final.r)).r,\n texture2D(softLight, vec2(metal.g, final.g)).g,\n texture2D(softLight, vec2(metal.b, final.b)).b);\n\n texel.rgb = metaled; \ntexel.rgb = mix(inputTexel.rgb, texel.rgb, strength);\n\ngl_FragColor = texel;\n}" | |
}, | |
{ | |
"filter": "IGNashvilleFilter", | |
"fragmentShader": "texel.rgb = vec3(texture2D(map, vec2(texel.r, .16666)).r,\n texture2D(map, vec2(texel.g, .5)).g,\n texture2D(map, vec2(texel.b, .83333)).b);", | |
"filterName": "Nashville", | |
"samplers": { | |
"map": "nashvilleMap.png" | |
}, | |
"borderName": "nashvilleBorder.png", | |
"vertexShader": "", | |
"fullVertexShader": "attribute vec3 a_position; attribute vec2 a_texCoord; uniform mat4 u_contentTransform; uniform mat4 u_texCoordTransform; varying vec2 textureCoordinate; varying vec2 sourceTextureCoordinate; void main() { gl_Position = u_contentTransform * vec4(a_position, 1.0); textureCoordinate = a_texCoord + vec2(0.5); vec4 texel = u_texCoordTransform * vec4(a_texCoord, 0.0, 1.0); sourceTextureCoordinate = texel.xy / texel.w + vec2(0.5); }", | |
"fullFragmentShader": "precision mediump float;varying vec2 textureCoordinate; varying vec2 sourceTextureCoordinate;\n uniform float strength; \nuniform sampler2D map; \nuniform sampler2D s_texture; void main() { vec4 texel = texture2D(s_texture, sourceTextureCoordinate);vec4 inputTexel = texel;texel.rgb = vec3(texture2D(map, vec2(texel.r, .16666)).r,\n texture2D(map, vec2(texel.g, .5)).g,\n texture2D(map, vec2(texel.b, .83333)).b); \ntexel.rgb = mix(inputTexel.rgb, texel.rgb, strength);\n\ngl_FragColor = texel;\n}" | |
}, | |
{ | |
"filter": "IGSutroFilter", | |
"fragmentShader": "vec2 tc = (2.0 * textureCoordinate) - 1.0;\n float d = dot(tc, tc);\n vec2 lookup = vec2(d, texel.r);\n texel.r = texture2D(vignetteMap, lookup).r;\n lookup.y = texel.g;\n texel.g = texture2D(vignetteMap, lookup).g;\n lookup.y = texel.b;\n texel.b = texture2D(vignetteMap, lookup).b;\n\n vec3 rgbPrime = vec3(0.1019, 0.0, 0.0);\n float m = dot(vec3(.3, .59, .11), texel.rgb) - 0.03058;\n texel.rgb = mix(texel.rgb, rgbPrime + m, 0.32);\n\n vec3 metal = texture2D(sutroMetal, textureCoordinate).rgb;\n texel.r = texture2D(softLight, vec2(metal.r, texel.r)).r;\n texel.g = texture2D(softLight, vec2(metal.g, texel.g)).g;\n texel.b = texture2D(softLight, vec2(metal.b, texel.b)).b;\n\n texel.rgb = texel.rgb * texture2D(edgeBurn, textureCoordinate).rgb;\n\n texel.r = texture2D(curves, vec2(texel.r, .16666)).r;\n texel.g = texture2D(curves, vec2(texel.g, .5)).g;\n texel.b = texture2D(curves, vec2(texel.b, .83333)).b;", | |
"filterName": "Sutro", | |
"samplers": { | |
"sutroMetal": "sutroMetal.pvr", | |
"edgeBurn": "sutroEdgeBurn.pvr", | |
"softLight": "softLight.png", | |
"curves": "sutroCurves.png", | |
"vignetteMap": "blackOverlayMap.png" | |
}, | |
"borderName": "sutroBorder.png", | |
"vertexShader": "", | |
"fullVertexShader": "attribute vec3 a_position; attribute vec2 a_texCoord; uniform mat4 u_contentTransform; uniform mat4 u_texCoordTransform; varying vec2 textureCoordinate; varying vec2 sourceTextureCoordinate; void main() { gl_Position = u_contentTransform * vec4(a_position, 1.0); textureCoordinate = a_texCoord + vec2(0.5); vec4 texel = u_texCoordTransform * vec4(a_texCoord, 0.0, 1.0); sourceTextureCoordinate = texel.xy / texel.w + vec2(0.5); }", | |
"fullFragmentShader": "precision mediump float;varying vec2 textureCoordinate; varying vec2 sourceTextureCoordinate;\n uniform float strength; \nuniform sampler2D sutroMetal; uniform sampler2D edgeBurn; uniform sampler2D softLight; uniform sampler2D curves; uniform sampler2D vignetteMap; \nuniform sampler2D s_texture; void main() { vec4 texel = texture2D(s_texture, sourceTextureCoordinate);vec4 inputTexel = texel;vec2 tc = (2.0 * textureCoordinate) - 1.0;\n float d = dot(tc, tc);\n vec2 lookup = vec2(d, texel.r);\n texel.r = texture2D(vignetteMap, lookup).r;\n lookup.y = texel.g;\n texel.g = texture2D(vignetteMap, lookup).g;\n lookup.y = texel.b;\n texel.b = texture2D(vignetteMap, lookup).b;\n\n vec3 rgbPrime = vec3(0.1019, 0.0, 0.0);\n float m = dot(vec3(.3, .59, .11), texel.rgb) - 0.03058;\n texel.rgb = mix(texel.rgb, rgbPrime + m, 0.32);\n\n vec3 metal = texture2D(sutroMetal, textureCoordinate).rgb;\n texel.r = texture2D(softLight, vec2(metal.r, texel.r)).r;\n texel.g = texture2D(softLight, vec2(metal.g, texel.g)).g;\n texel.b = texture2D(softLight, vec2(metal.b, texel.b)).b;\n\n texel.rgb = texel.rgb * texture2D(edgeBurn, textureCoordinate).rgb;\n\n texel.r = texture2D(curves, vec2(texel.r, .16666)).r;\n texel.g = texture2D(curves, vec2(texel.g, .5)).g;\n texel.b = texture2D(curves, vec2(texel.b, .83333)).b; \ntexel.rgb = mix(inputTexel.rgb, texel.rgb, strength);\n\ngl_FragColor = texel;\n}" | |
}, | |
{ | |
"filter": "IGToasterFilter", | |
"fragmentShader": "vec2 red;\n vec2 green;\n vec2 blue;\n vec2 tc;\n vec2 lookup;\n vec3 metalSample;\n float d;\n\n metalSample = texture2D(metal, textureCoordinate).rgb;\n\n lookup.x = metalSample.r;\n lookup.y = texel.r;\n texel.r = texture2D(softLight, lookup).r;\n lookup.x = metalSample.g;\n lookup.y = texel.g;\n texel.g = texture2D(softLight, lookup).g;\n lookup.x = metalSample.b;\n lookup.y = texel.b;\n texel.b = texture2D(softLight, lookup).b;\n\n lookup.y = .5;\n lookup.x = texel.r;\n texel.r = texture2D(curves, lookup).r;\n lookup.x = texel.g;\n texel.g = texture2D(curves, lookup).g;\n lookup.x = texel.b;\n texel.b = texture2D(curves, lookup).b;\n\n tc = (2.0 * textureCoordinate) - 1.0;\n d = dot(tc, tc);\n lookup = vec2(d, texel.r);\n texel.r = texture2D(vignetteMap, lookup).r;\n lookup.y = texel.g;\n texel.g = texture2D(vignetteMap, lookup).g;\n lookup.y = texel.b;\n texel.b = texture2D(vignetteMap, lookup).b;\n\n // Exclusion / Soft light\n lookup.y = .5;\n lookup.x = texel.r;\n texel.r = texture2D(colorShift, lookup).r;\n lookup.x = texel.g;\n texel.g = texture2D(colorShift, lookup).g;\n lookup.x = texel.b;\n texel.b = texture2D(colorShift, lookup).b;", | |
"filterName": "Toaster", | |
"samplers": { | |
"vignetteMap": "toasterOverlayMapWarm.png", | |
"colorShift": "toasterColorShift.png", | |
"softLight": "toasterSoftLight.png", | |
"curves": "toasterCurves.png", | |
"metal": "metalTexture2.pvr" | |
}, | |
"borderName": "filterBorderPlainWhite.png", | |
"vertexShader": "", | |
"fullVertexShader": "attribute vec3 a_position; attribute vec2 a_texCoord; uniform mat4 u_contentTransform; uniform mat4 u_texCoordTransform; varying vec2 textureCoordinate; varying vec2 sourceTextureCoordinate; void main() { gl_Position = u_contentTransform * vec4(a_position, 1.0); textureCoordinate = a_texCoord + vec2(0.5); vec4 texel = u_texCoordTransform * vec4(a_texCoord, 0.0, 1.0); sourceTextureCoordinate = texel.xy / texel.w + vec2(0.5); }", | |
"fullFragmentShader": "precision mediump float;varying vec2 textureCoordinate; varying vec2 sourceTextureCoordinate;\n uniform float strength; \nuniform sampler2D vignetteMap; uniform sampler2D colorShift; uniform sampler2D softLight; uniform sampler2D curves; uniform sampler2D metal; \nuniform sampler2D s_texture; void main() { vec4 texel = texture2D(s_texture, sourceTextureCoordinate);vec4 inputTexel = texel;vec2 red;\n vec2 green;\n vec2 blue;\n vec2 tc;\n vec2 lookup;\n vec3 metalSample;\n float d;\n\n metalSample = texture2D(metal, textureCoordinate).rgb;\n\n lookup.x = metalSample.r;\n lookup.y = texel.r;\n texel.r = texture2D(softLight, lookup).r;\n lookup.x = metalSample.g;\n lookup.y = texel.g;\n texel.g = texture2D(softLight, lookup).g;\n lookup.x = metalSample.b;\n lookup.y = texel.b;\n texel.b = texture2D(softLight, lookup).b;\n\n lookup.y = .5;\n lookup.x = texel.r;\n texel.r = texture2D(curves, lookup).r;\n lookup.x = texel.g;\n texel.g = texture2D(curves, lookup).g;\n lookup.x = texel.b;\n texel.b = texture2D(curves, lookup).b;\n\n tc = (2.0 * textureCoordinate) - 1.0;\n d = dot(tc, tc);\n lookup = vec2(d, texel.r);\n texel.r = texture2D(vignetteMap, lookup).r;\n lookup.y = texel.g;\n texel.g = texture2D(vignetteMap, lookup).g;\n lookup.y = texel.b;\n texel.b = texture2D(vignetteMap, lookup).b;\n\n // Exclusion / Soft light\n lookup.y = .5;\n lookup.x = texel.r;\n texel.r = texture2D(colorShift, lookup).r;\n lookup.x = texel.g;\n texel.g = texture2D(colorShift, lookup).g;\n lookup.x = texel.b;\n texel.b = texture2D(colorShift, lookup).b; \ntexel.rgb = mix(inputTexel.rgb, texel.rgb, strength);\n\ngl_FragColor = texel;\n}" | |
}, | |
{ | |
"filter": "IGWaldenFilter", | |
"fragmentShader": "texel.rgb = vec3(texture2D(waldenMap, vec2(texel.r, .16666)).r,\n texture2D(waldenMap, vec2(texel.g, .5)).g,\n texture2D(waldenMap, vec2(texel.b, .83333)).b);\n\n vec2 tc = (2.0 * textureCoordinate) - 1.0;\n\n float d = dot(tc, tc);\n vec2 lookup = vec2(d, texel.r);\n\n texel.r = texture2D(vignetteMap, lookup).r;\n lookup.y = texel.g;\n texel.g = texture2D(vignetteMap, lookup).g;\n lookup.y = texel.b;\n texel.b = texture2D(vignetteMap, lookup).b;", | |
"filterName": "Walden", | |
"samplers": { | |
"vignetteMap": "vignetteMap.png", | |
"waldenMap": "waldenMap.png" | |
}, | |
"borderName": "waldenBorder.png", | |
"vertexShader": "", | |
"fullVertexShader": "attribute vec3 a_position; attribute vec2 a_texCoord; uniform mat4 u_contentTransform; uniform mat4 u_texCoordTransform; varying vec2 textureCoordinate; varying vec2 sourceTextureCoordinate; void main() { gl_Position = u_contentTransform * vec4(a_position, 1.0); textureCoordinate = a_texCoord + vec2(0.5); vec4 texel = u_texCoordTransform * vec4(a_texCoord, 0.0, 1.0); sourceTextureCoordinate = texel.xy / texel.w + vec2(0.5); }", | |
"fullFragmentShader": "precision mediump float;varying vec2 textureCoordinate; varying vec2 sourceTextureCoordinate;\n uniform float strength; \nuniform sampler2D vignetteMap; uniform sampler2D waldenMap; \nuniform sampler2D s_texture; void main() { vec4 texel = texture2D(s_texture, sourceTextureCoordinate);vec4 inputTexel = texel;texel.rgb = vec3(texture2D(waldenMap, vec2(texel.r, .16666)).r,\n texture2D(waldenMap, vec2(texel.g, .5)).g,\n texture2D(waldenMap, vec2(texel.b, .83333)).b);\n\n vec2 tc = (2.0 * textureCoordinate) - 1.0;\n\n float d = dot(tc, tc);\n vec2 lookup = vec2(d, texel.r);\n\n texel.r = texture2D(vignetteMap, lookup).r;\n lookup.y = texel.g;\n texel.g = texture2D(vignetteMap, lookup).g;\n lookup.y = texel.b;\n texel.b = texture2D(vignetteMap, lookup).b; \ntexel.rgb = mix(inputTexel.rgb, texel.rgb, strength);\n\ngl_FragColor = texel;\n}" | |
}, | |
{ | |
"filter": "IG1977Filter", | |
"fragmentShader": "vec2 lookup;\n\n lookup.y = .5;\n\n lookup.x = texel.r;\n texel.r = texture2D(screen, lookup).r;\n lookup.x = texel.g;\n texel.g = texture2D(screen, lookup).g;\n lookup.x = texel.b;\n texel.b = texture2D(screen, lookup).b;\n\n lookup.x = texel.r;\n texel.r = texture2D(map, lookup).r;\n lookup.x = texel.g;\n texel.g = texture2D(map, lookup).g;\n lookup.x = texel.b;\n texel.b = texture2D(map, lookup).b;", | |
"filterName": "1977", | |
"samplers": { | |
"map": "1977map.png", | |
"screen": "screen30.png" | |
}, | |
"borderName": "filterBorderPlainWhite.png", | |
"vertexShader": "", | |
"fullVertexShader": "attribute vec3 a_position; attribute vec2 a_texCoord; uniform mat4 u_contentTransform; uniform mat4 u_texCoordTransform; varying vec2 textureCoordinate; varying vec2 sourceTextureCoordinate; void main() { gl_Position = u_contentTransform * vec4(a_position, 1.0); textureCoordinate = a_texCoord + vec2(0.5); vec4 texel = u_texCoordTransform * vec4(a_texCoord, 0.0, 1.0); sourceTextureCoordinate = texel.xy / texel.w + vec2(0.5); }", | |
"fullFragmentShader": "precision mediump float;varying vec2 textureCoordinate; varying vec2 sourceTextureCoordinate;\n uniform float strength; \nuniform sampler2D map; uniform sampler2D screen; \nuniform sampler2D s_texture; void main() { vec4 texel = texture2D(s_texture, sourceTextureCoordinate);vec4 inputTexel = texel;vec2 lookup;\n\n lookup.y = .5;\n\n lookup.x = texel.r;\n texel.r = texture2D(screen, lookup).r;\n lookup.x = texel.g;\n texel.g = texture2D(screen, lookup).g;\n lookup.x = texel.b;\n texel.b = texture2D(screen, lookup).b;\n\n lookup.x = texel.r;\n texel.r = texture2D(map, lookup).r;\n lookup.x = texel.g;\n texel.g = texture2D(map, lookup).g;\n lookup.x = texel.b;\n texel.b = texture2D(map, lookup).b; \ntexel.rgb = mix(inputTexel.rgb, texel.rgb, strength);\n\ngl_FragColor = texel;\n}" | |
}, | |
{ | |
"filter": "IGKelvinFilter", | |
"fragmentShader": "vec2 lookup;\n lookup.y = .5;\n\n lookup.x = texel.r;\n texel.r = texture2D(map, lookup).r;\n\n lookup.x = texel.g;\n texel.g = texture2D(map, lookup).g;\n\n lookup.x = texel.b;\n texel.b = texture2D(map, lookup).b;", | |
"filterName": "Kelvin", | |
"samplers": { | |
"map": "kelvinMap.png" | |
}, | |
"borderName": "kelvinBorder.png", | |
"vertexShader": "", | |
"fullVertexShader": "attribute vec3 a_position; attribute vec2 a_texCoord; uniform mat4 u_contentTransform; uniform mat4 u_texCoordTransform; varying vec2 textureCoordinate; varying vec2 sourceTextureCoordinate; void main() { gl_Position = u_contentTransform * vec4(a_position, 1.0); textureCoordinate = a_texCoord + vec2(0.5); vec4 texel = u_texCoordTransform * vec4(a_texCoord, 0.0, 1.0); sourceTextureCoordinate = texel.xy / texel.w + vec2(0.5); }", | |
"fullFragmentShader": "precision mediump float;varying vec2 textureCoordinate; varying vec2 sourceTextureCoordinate;\n uniform float strength; \nuniform sampler2D map; \nuniform sampler2D s_texture; void main() { vec4 texel = texture2D(s_texture, sourceTextureCoordinate);vec4 inputTexel = texel;vec2 lookup;\n lookup.y = .5;\n\n lookup.x = texel.r;\n texel.r = texture2D(map, lookup).r;\n\n lookup.x = texel.g;\n texel.g = texture2D(map, lookup).g;\n\n lookup.x = texel.b;\n texel.b = texture2D(map, lookup).b; \ntexel.rgb = mix(inputTexel.rgb, texel.rgb, strength);\n\ngl_FragColor = texel;\n}" | |
}, | |
{ | |
"filter": "IGStinsonVideoFilter", | |
"fragmentShader": "// exposure adjust B'=B*2^(EV/2.2), EV = 0.3\n texel.rgb = min(texel.rgb * 1.099, vec3(1.0));\n\n // apply curves\n texel.r = texture2D(map, vec2(texel.r, 0.5)).r;\n texel.g = texture2D(map, vec2(texel.g, 0.5)).g;\n texel.b = texture2D(map, vec2(texel.b, 0.5)).b;\n\n // ranged saturation\n // slight decrease in highlights and midtones\n // slight increase in shadows\n float luma = dot(vec3(0.309, 0.609, 0.082), texel.rgb);\n float mixCoeff = mix(0.1, -0.09, min(1.0 - luma * 2.0, 1.0));\n texel.rgb = mix(texel.rgb, vec3(luma), mixCoeff);", | |
"filterName": "Stinson", | |
"samplers": { | |
"map": "seventies_curves.png" | |
}, | |
"borderName": "filterBorderPlainWhite.png", | |
"vertexShader": "", | |
"fullVertexShader": "attribute vec3 a_position; attribute vec2 a_texCoord; uniform mat4 u_contentTransform; uniform mat4 u_texCoordTransform; varying vec2 textureCoordinate; varying vec2 sourceTextureCoordinate; void main() { gl_Position = u_contentTransform * vec4(a_position, 1.0); textureCoordinate = a_texCoord + vec2(0.5); vec4 texel = u_texCoordTransform * vec4(a_texCoord, 0.0, 1.0); sourceTextureCoordinate = texel.xy / texel.w + vec2(0.5); }", | |
"fullFragmentShader": "precision mediump float;varying vec2 textureCoordinate; varying vec2 sourceTextureCoordinate;\n uniform float strength; \nuniform sampler2D map; \nuniform sampler2D s_texture; void main() { vec4 texel = texture2D(s_texture, sourceTextureCoordinate);vec4 inputTexel = texel;// exposure adjust B'=B*2^(EV/2.2), EV = 0.3\n texel.rgb = min(texel.rgb * 1.099, vec3(1.0));\n\n // apply curves\n texel.r = texture2D(map, vec2(texel.r, 0.5)).r;\n texel.g = texture2D(map, vec2(texel.g, 0.5)).g;\n texel.b = texture2D(map, vec2(texel.b, 0.5)).b;\n\n // ranged saturation\n // slight decrease in highlights and midtones\n // slight increase in shadows\n float luma = dot(vec3(0.309, 0.609, 0.082), texel.rgb);\n float mixCoeff = mix(0.1, -0.09, min(1.0 - luma * 2.0, 1.0));\n texel.rgb = mix(texel.rgb, vec3(luma), mixCoeff); \ntexel.rgb = mix(inputTexel.rgb, texel.rgb, strength);\n\ngl_FragColor = texel;\n}" | |
}, | |
{ | |
"filter": "IGVesperVideoFilter", | |
"fragmentShader": "texel.r = texture2D(map, vec2(texel.r, 0.5)).r;\n texel.g = texture2D(map, vec2(texel.g, 0.5)).g;\n texel.b = texture2D(map, vec2(texel.b, 0.5)).b;", | |
"filterName": "Vesper", | |
"samplers": { | |
"map": "luster_map.png" | |
}, | |
"borderName": "filterBorderPlainWhite.png", | |
"vertexShader": "", | |
"fullVertexShader": "attribute vec3 a_position; attribute vec2 a_texCoord; uniform mat4 u_contentTransform; uniform mat4 u_texCoordTransform; varying vec2 textureCoordinate; varying vec2 sourceTextureCoordinate; void main() { gl_Position = u_contentTransform * vec4(a_position, 1.0); textureCoordinate = a_texCoord + vec2(0.5); vec4 texel = u_texCoordTransform * vec4(a_texCoord, 0.0, 1.0); sourceTextureCoordinate = texel.xy / texel.w + vec2(0.5); }", | |
"fullFragmentShader": "precision mediump float;varying vec2 textureCoordinate; varying vec2 sourceTextureCoordinate;\n uniform float strength; \nuniform sampler2D map; \nuniform sampler2D s_texture; void main() { vec4 texel = texture2D(s_texture, sourceTextureCoordinate);vec4 inputTexel = texel;texel.r = texture2D(map, vec2(texel.r, 0.5)).r;\n texel.g = texture2D(map, vec2(texel.g, 0.5)).g;\n texel.b = texture2D(map, vec2(texel.b, 0.5)).b; \ntexel.rgb = mix(inputTexel.rgb, texel.rgb, strength);\n\ngl_FragColor = texel;\n}" | |
}, | |
{ | |
"filter": "IGMavenVideoFilter", | |
"fragmentShader": "vec3 original = texel.rgb;\n\n // saturation boost\n float luma = dot(vec3(0.2126, 0.7152, 0.0722), texel.rgb);\n texel.rgb = mix(texel.rgb, vec3(luma), -0.17);\n\n // contrast boost - darken shadows\n texel.rgb = mix(texel.rgb, texel.rgb * vec3(0.5, 0.3, 0.3), 0.8 * (1.0 - luma));\n // slight boost to highlights\n texel.rgb = min(mix(texel.rgb, texel.rgb * vec3(1.18, 1.15, 1.1), max(0.0, luma - 0.5)), vec3(1.0));\n\n // apply curves\n texel.r = texture2D(map1, vec2(texel.r, 0.5)).r;\n texel.g = texture2D(map1, vec2(texel.g, 0.5)).g;\n texel.b = texture2D(map1, vec2(texel.b, 0.5)).b;\n\n // apply curves2\n texel.r = texture2D(map2, vec2(texel.r, 0.5)).r;\n texel.g = texture2D(map2, vec2(texel.g, 0.5)).g;\n texel.b = texture2D(map2, vec2(texel.b, 0.5)).b;\n\n // tone down\n texel.rgb = mix(texel.rgb, original, 0.1);", | |
"filterName": "Maven", | |
"samplers": { | |
"map1": "Lansdowne1.png", | |
"map2": "Lansdowne2.png" | |
}, | |
"borderName": "filterBorderPlainWhite.png", | |
"vertexShader": "", | |
"fullVertexShader": "attribute vec3 a_position; attribute vec2 a_texCoord; uniform mat4 u_contentTransform; uniform mat4 u_texCoordTransform; varying vec2 textureCoordinate; varying vec2 sourceTextureCoordinate; void main() { gl_Position = u_contentTransform * vec4(a_position, 1.0); textureCoordinate = a_texCoord + vec2(0.5); vec4 texel = u_texCoordTransform * vec4(a_texCoord, 0.0, 1.0); sourceTextureCoordinate = texel.xy / texel.w + vec2(0.5); }", | |
"fullFragmentShader": "precision mediump float;varying vec2 textureCoordinate; varying vec2 sourceTextureCoordinate;\n uniform float strength; \nuniform sampler2D map1; uniform sampler2D map2; \nuniform sampler2D s_texture; void main() { vec4 texel = texture2D(s_texture, sourceTextureCoordinate);vec4 inputTexel = texel;vec3 original = texel.rgb;\n\n // saturation boost\n float luma = dot(vec3(0.2126, 0.7152, 0.0722), texel.rgb);\n texel.rgb = mix(texel.rgb, vec3(luma), -0.17);\n\n // contrast boost - darken shadows\n texel.rgb = mix(texel.rgb, texel.rgb * vec3(0.5, 0.3, 0.3), 0.8 * (1.0 - luma));\n // slight boost to highlights\n texel.rgb = min(mix(texel.rgb, texel.rgb * vec3(1.18, 1.15, 1.1), max(0.0, luma - 0.5)), vec3(1.0));\n\n // apply curves\n texel.r = texture2D(map1, vec2(texel.r, 0.5)).r;\n texel.g = texture2D(map1, vec2(texel.g, 0.5)).g;\n texel.b = texture2D(map1, vec2(texel.b, 0.5)).b;\n\n // apply curves2\n texel.r = texture2D(map2, vec2(texel.r, 0.5)).r;\n texel.g = texture2D(map2, vec2(texel.g, 0.5)).g;\n texel.b = texture2D(map2, vec2(texel.b, 0.5)).b;\n\n // tone down\n texel.rgb = mix(texel.rgb, original, 0.1); \ntexel.rgb = mix(inputTexel.rgb, texel.rgb, strength);\n\ngl_FragColor = texel;\n}" | |
}, | |
{ | |
"filter": "IGGinzaVideoFilter", | |
"fragmentShader": "// curves and blue fill light\n texel.r = texture2D(map1, vec2(texel.r, 0.5)).r;\n texel.g = texture2D(map1, vec2(texel.g, 0.5)).g;\n texel.b = texture2D(map1, vec2(texel.b, 0.5)).b;\n\n // increase saturation - channel weighted\n texel.rgb = mix(texel.rgb, vec3(dot(vec3(0.3, 0.6, 0.07), texel.rgb)), -0.1);\n // slight boost to orange\n texel.r = min(1.0, texel.r * 1.04);\n texel.g = min(1.0, texel.g * 1.03);\n\n // lift gamma gain and warm tint map\n texel.r = texture2D(map2, vec2(texel.r, 0.5)).r;\n texel.g = texture2D(map2, vec2(texel.g, 0.5)).g;\n texel.b = texture2D(map2, vec2(texel.b, 0.5)).b;", | |
"filterName": "Ginza", | |
"samplers": { | |
"map1": "chic_curves1.png", | |
"map2": "chic_curves2.png" | |
}, | |
"borderName": "filterBorderPlainWhite.png", | |
"vertexShader": "", | |
"fullVertexShader": "attribute vec3 a_position; attribute vec2 a_texCoord; uniform mat4 u_contentTransform; uniform mat4 u_texCoordTransform; varying vec2 textureCoordinate; varying vec2 sourceTextureCoordinate; void main() { gl_Position = u_contentTransform * vec4(a_position, 1.0); textureCoordinate = a_texCoord + vec2(0.5); vec4 texel = u_texCoordTransform * vec4(a_texCoord, 0.0, 1.0); sourceTextureCoordinate = texel.xy / texel.w + vec2(0.5); }", | |
"fullFragmentShader": "precision mediump float;varying vec2 textureCoordinate; varying vec2 sourceTextureCoordinate;\n uniform float strength; \nuniform sampler2D map1; uniform sampler2D map2; \nuniform sampler2D s_texture; void main() { vec4 texel = texture2D(s_texture, sourceTextureCoordinate);vec4 inputTexel = texel;// curves and blue fill light\n texel.r = texture2D(map1, vec2(texel.r, 0.5)).r;\n texel.g = texture2D(map1, vec2(texel.g, 0.5)).g;\n texel.b = texture2D(map1, vec2(texel.b, 0.5)).b;\n\n // increase saturation - channel weighted\n texel.rgb = mix(texel.rgb, vec3(dot(vec3(0.3, 0.6, 0.07), texel.rgb)), -0.1);\n // slight boost to orange\n texel.r = min(1.0, texel.r * 1.04);\n texel.g = min(1.0, texel.g * 1.03);\n\n // lift gamma gain and warm tint map\n texel.r = texture2D(map2, vec2(texel.r, 0.5)).r;\n texel.g = texture2D(map2, vec2(texel.g, 0.5)).g;\n texel.b = texture2D(map2, vec2(texel.b, 0.5)).b; \ntexel.rgb = mix(inputTexel.rgb, texel.rgb, strength);\n\ngl_FragColor = texel;\n}" | |
}, | |
{ | |
"filter": "IGSkylineVideoFilter", | |
"fragmentShader": "// Exposure adjust B'=B*2^(EV/2.2), EV = 0.5\n texel.rgb = min(texel.rgb * 1.1, vec3(1.0));\n\n // apply curves for map and lift-gamma-gain\n texel.r = texture2D(map, vec2(texel.r, 0.5)).r;\n texel.g = texture2D(map, vec2(texel.g, 0.5)).g;\n texel.b = texture2D(map, vec2(texel.b, 0.5)).b;\n\n // color effects on shadows and highlights:\n // screen blend shadows under around 0.3 luma\n // linear blend highlights [1.0, 0.105] luma\n vec3 highlightColor = vec3(1.0, 1.0, 0.043137);\n vec3 shadowColor = vec3(0.97254, 0.486274, 0.0313725);\n float luma = dot(vec3(0.309, 0.609, 0.082), texel.rgb);\n vec3 shadowBlend = 1.0 - (1.0 - shadowColor) * (1.0 - texel.rgb);\n vec3 highlightBlend = highlightColor + 2.0 * texel.rgb - 1.0;\n float highlightAmount = 0.008 * (luma - 0.15);\n float shadowAmount = 0.07 * max(0.0, (1.0 - 3.0 * luma));\n texel.rgb = mix(mix(texel.rgb, highlightBlend, highlightAmount), shadowBlend, shadowAmount);\n\n // final saturation pass\n texel.rgb = mix(texel.rgb, vec3(luma), -0.225);", | |
"filterName": "Skyline", | |
"samplers": { | |
"map": "super_film_stock_curves.png" | |
}, | |
"borderName": "filterBorderPlainWhite.png", | |
"vertexShader": "", | |
"fullVertexShader": "attribute vec3 a_position; attribute vec2 a_texCoord; uniform mat4 u_contentTransform; uniform mat4 u_texCoordTransform; varying vec2 textureCoordinate; varying vec2 sourceTextureCoordinate; void main() { gl_Position = u_contentTransform * vec4(a_position, 1.0); textureCoordinate = a_texCoord + vec2(0.5); vec4 texel = u_texCoordTransform * vec4(a_texCoord, 0.0, 1.0); sourceTextureCoordinate = texel.xy / texel.w + vec2(0.5); }", | |
"fullFragmentShader": "precision mediump float;varying vec2 textureCoordinate; varying vec2 sourceTextureCoordinate;\n uniform float strength; \nuniform sampler2D map; \nuniform sampler2D s_texture; void main() { vec4 texel = texture2D(s_texture, sourceTextureCoordinate);vec4 inputTexel = texel;// Exposure adjust B'=B*2^(EV/2.2), EV = 0.5\n texel.rgb = min(texel.rgb * 1.1, vec3(1.0));\n\n // apply curves for map and lift-gamma-gain\n texel.r = texture2D(map, vec2(texel.r, 0.5)).r;\n texel.g = texture2D(map, vec2(texel.g, 0.5)).g;\n texel.b = texture2D(map, vec2(texel.b, 0.5)).b;\n\n // color effects on shadows and highlights:\n // screen blend shadows under around 0.3 luma\n // linear blend highlights [1.0, 0.105] luma\n vec3 highlightColor = vec3(1.0, 1.0, 0.043137);\n vec3 shadowColor = vec3(0.97254, 0.486274, 0.0313725);\n float luma = dot(vec3(0.309, 0.609, 0.082), texel.rgb);\n vec3 shadowBlend = 1.0 - (1.0 - shadowColor) * (1.0 - texel.rgb);\n vec3 highlightBlend = highlightColor + 2.0 * texel.rgb - 1.0;\n float highlightAmount = 0.008 * (luma - 0.15);\n float shadowAmount = 0.07 * max(0.0, (1.0 - 3.0 * luma));\n texel.rgb = mix(mix(texel.rgb, highlightBlend, highlightAmount), shadowBlend, shadowAmount);\n\n // final saturation pass\n texel.rgb = mix(texel.rgb, vec3(luma), -0.225); \ntexel.rgb = mix(inputTexel.rgb, texel.rgb, strength);\n\ngl_FragColor = texel;\n}" | |
}, | |
{ | |
"filter": "IGDogpatchVideoFilter", | |
"fragmentShader": "// exposure adjust B'=B*2^(EV/2.2), EV = 0.4\n texel.rgb = min(texel.rgb * 1.1343, vec3(1.0));\n\n // apply curves\n texel.r = texture2D(map1, vec2(texel.r, 0.5)).r;\n texel.g = texture2D(map1, vec2(texel.g, 0.5)).g;\n texel.b = texture2D(map1, vec2(texel.b, 0.5)).b;\n\n // desaturation\n vec3 luma = vec3(dot(vec3(0.309, 0.609, 0.082), texel.rgb));\n texel.rgb = mix(texel.rgb, luma, 0.15);\n\n // apply map for lift-gamma-gain\n texel.r = texture2D(mapLgg, vec2(texel.r, 0.5)).r;\n texel.g = texture2D(mapLgg, vec2(texel.g, 0.5)).g;\n texel.b = texture2D(mapLgg, vec2(texel.b, 0.5)).b;", | |
"filterName": "Dogpatch", | |
"samplers": { | |
"map1": "bleach_reduction_curves1.png", | |
"mapLgg": "bleach_reduction_lgg.png" | |
}, | |
"borderName": "filterBorderPlainWhite.png", | |
"vertexShader": "", | |
"fullVertexShader": "attribute vec3 a_position; attribute vec2 a_texCoord; uniform mat4 u_contentTransform; uniform mat4 u_texCoordTransform; varying vec2 textureCoordinate; varying vec2 sourceTextureCoordinate; void main() { gl_Position = u_contentTransform * vec4(a_position, 1.0); textureCoordinate = a_texCoord + vec2(0.5); vec4 texel = u_texCoordTransform * vec4(a_texCoord, 0.0, 1.0); sourceTextureCoordinate = texel.xy / texel.w + vec2(0.5); }", | |
"fullFragmentShader": "precision mediump float;varying vec2 textureCoordinate; varying vec2 sourceTextureCoordinate;\n uniform float strength; \nuniform sampler2D map1; uniform sampler2D mapLgg; \nuniform sampler2D s_texture; void main() { vec4 texel = texture2D(s_texture, sourceTextureCoordinate);vec4 inputTexel = texel;// exposure adjust B'=B*2^(EV/2.2), EV = 0.4\n texel.rgb = min(texel.rgb * 1.1343, vec3(1.0));\n\n // apply curves\n texel.r = texture2D(map1, vec2(texel.r, 0.5)).r;\n texel.g = texture2D(map1, vec2(texel.g, 0.5)).g;\n texel.b = texture2D(map1, vec2(texel.b, 0.5)).b;\n\n // desaturation\n vec3 luma = vec3(dot(vec3(0.309, 0.609, 0.082), texel.rgb));\n texel.rgb = mix(texel.rgb, luma, 0.15);\n\n // apply map for lift-gamma-gain\n texel.r = texture2D(mapLgg, vec2(texel.r, 0.5)).r;\n texel.g = texture2D(mapLgg, vec2(texel.g, 0.5)).g;\n texel.b = texture2D(mapLgg, vec2(texel.b, 0.5)).b; \ntexel.rgb = mix(inputTexel.rgb, texel.rgb, strength);\n\ngl_FragColor = texel;\n}" | |
}, | |
{ | |
"filter": "IGBrooklynVideoFilter", | |
"fragmentShader": "texel.r = texture2D(map, vec2(texel.r, 0.5)).r;\n texel.g = texture2D(map, vec2(texel.g, 0.5)).g;\n texel.b = texture2D(map, vec2(texel.b, 0.5)).b;", | |
"filterName": "Brooklyn", | |
"samplers": { | |
"map": "crossprotwo_curves.png" | |
}, | |
"borderName": "filterBorderPlainWhite.png", | |
"vertexShader": "", | |
"fullVertexShader": "attribute vec3 a_position; attribute vec2 a_texCoord; uniform mat4 u_contentTransform; uniform mat4 u_texCoordTransform; varying vec2 textureCoordinate; varying vec2 sourceTextureCoordinate; void main() { gl_Position = u_contentTransform * vec4(a_position, 1.0); textureCoordinate = a_texCoord + vec2(0.5); vec4 texel = u_texCoordTransform * vec4(a_texCoord, 0.0, 1.0); sourceTextureCoordinate = texel.xy / texel.w + vec2(0.5); }", | |
"fullFragmentShader": "precision mediump float;varying vec2 textureCoordinate; varying vec2 sourceTextureCoordinate;\n uniform float strength; \nuniform sampler2D map; \nuniform sampler2D s_texture; void main() { vec4 texel = texture2D(s_texture, sourceTextureCoordinate);vec4 inputTexel = texel;texel.r = texture2D(map, vec2(texel.r, 0.5)).r;\n texel.g = texture2D(map, vec2(texel.g, 0.5)).g;\n texel.b = texture2D(map, vec2(texel.b, 0.5)).b; \ntexel.rgb = mix(inputTexel.rgb, texel.rgb, strength);\n\ngl_FragColor = texel;\n}" | |
}, | |
{ | |
"filter": "IGHelenaVideoFilter", | |
"fragmentShader": "// saturation boost\n float luma = dot(vec3(0.2126, 0.7152, 0.0722), texel.rgb);\n texel.rgb = mix(texel.rgb, vec3(luma), -0.17);\n\n // apply curves\n texel.r = texture2D(map1, vec2(texel.r, 0.5)).r;\n texel.g = texture2D(map1, vec2(texel.g, 0.5)).g;\n texel.b = texture2D(map1, vec2(texel.b, 0.5)).b;\n\n // contrast boost - darken shadows with original luma\n texel.rgb = mix(texel.rgb, texel.rgb * texel.rgb, 0.8 * (1.0 - luma));\n // slight boost to highlights\n texel.rgb = mix(texel.rgb, texel.rgb * 1.1, max(0.0, luma - 0.5));\n\n // apply curves2\n texel.r = texture2D(map2, vec2(texel.r, 0.5)).r;\n texel.g = texture2D(map2, vec2(texel.g, 0.5)).g;\n texel.b = texture2D(map2, vec2(texel.b, 0.5)).b;", | |
"filterName": "Helena", | |
"samplers": { | |
"map1": "epic_1.png", | |
"map2": "epic_2.png" | |
}, | |
"borderName": "filterBorderPlainWhite.png", | |
"vertexShader": "", | |
"fullVertexShader": "attribute vec3 a_position; attribute vec2 a_texCoord; uniform mat4 u_contentTransform; uniform mat4 u_texCoordTransform; varying vec2 textureCoordinate; varying vec2 sourceTextureCoordinate; void main() { gl_Position = u_contentTransform * vec4(a_position, 1.0); textureCoordinate = a_texCoord + vec2(0.5); vec4 texel = u_texCoordTransform * vec4(a_texCoord, 0.0, 1.0); sourceTextureCoordinate = texel.xy / texel.w + vec2(0.5); }", | |
"fullFragmentShader": "precision mediump float;varying vec2 textureCoordinate; varying vec2 sourceTextureCoordinate;\n uniform float strength; \nuniform sampler2D map1; uniform sampler2D map2; \nuniform sampler2D s_texture; void main() { vec4 texel = texture2D(s_texture, sourceTextureCoordinate);vec4 inputTexel = texel;// saturation boost\n float luma = dot(vec3(0.2126, 0.7152, 0.0722), texel.rgb);\n texel.rgb = mix(texel.rgb, vec3(luma), -0.17);\n\n // apply curves\n texel.r = texture2D(map1, vec2(texel.r, 0.5)).r;\n texel.g = texture2D(map1, vec2(texel.g, 0.5)).g;\n texel.b = texture2D(map1, vec2(texel.b, 0.5)).b;\n\n // contrast boost - darken shadows with original luma\n texel.rgb = mix(texel.rgb, texel.rgb * texel.rgb, 0.8 * (1.0 - luma));\n // slight boost to highlights\n texel.rgb = mix(texel.rgb, texel.rgb * 1.1, max(0.0, luma - 0.5));\n\n // apply curves2\n texel.r = texture2D(map2, vec2(texel.r, 0.5)).r;\n texel.g = texture2D(map2, vec2(texel.g, 0.5)).g;\n texel.b = texture2D(map2, vec2(texel.b, 0.5)).b; \ntexel.rgb = mix(inputTexel.rgb, texel.rgb, strength);\n\ngl_FragColor = texel;\n}" | |
}, | |
{ | |
"filter": "IGAshbyVideoFilter", | |
"fragmentShader": "// look up luma map and do slight luma adjust\n float luma = dot(vec3(0.2126, 0.7152, 0.0722), texel.rgb);\n float adjustCoeff = texture2D(tonemap, vec2(luma, 0.5)).r;\n float diff = 1.0 + adjustCoeff - luma;\n texel.rgb = mix(texel.rgb, texel.rgb * diff, 0.5);\n\n // levels 2\n texel.r = texture2D(levels, vec2(texel.r, 0.5)).r;\n texel.g = texture2D(levels, vec2(texel.g, 0.5)).g;\n texel.b = texture2D(levels, vec2(texel.b, 0.5)).b;\n\n // slight saturation boost\n vec3 lumaFinal = vec3(dot(vec3(0.2126, 0.7152, 0.0722), texel.rgb));\n texel.rgb = mix(texel.rgb, lumaFinal, -0.1);", | |
"filterName": "Ashby", | |
"samplers": { | |
"tonemap": "classy_look_tonemap1.png", | |
"levels": "classy_look_levels2.png" | |
}, | |
"borderName": "filterBorderPlainWhite.png", | |
"vertexShader": "", | |
"fullVertexShader": "attribute vec3 a_position; attribute vec2 a_texCoord; uniform mat4 u_contentTransform; uniform mat4 u_texCoordTransform; varying vec2 textureCoordinate; varying vec2 sourceTextureCoordinate; void main() { gl_Position = u_contentTransform * vec4(a_position, 1.0); textureCoordinate = a_texCoord + vec2(0.5); vec4 texel = u_texCoordTransform * vec4(a_texCoord, 0.0, 1.0); sourceTextureCoordinate = texel.xy / texel.w + vec2(0.5); }", | |
"fullFragmentShader": "precision mediump float;varying vec2 textureCoordinate; varying vec2 sourceTextureCoordinate;\n uniform float strength; \nuniform sampler2D tonemap; uniform sampler2D levels; \nuniform sampler2D s_texture; void main() { vec4 texel = texture2D(s_texture, sourceTextureCoordinate);vec4 inputTexel = texel;// look up luma map and do slight luma adjust\n float luma = dot(vec3(0.2126, 0.7152, 0.0722), texel.rgb);\n float adjustCoeff = texture2D(tonemap, vec2(luma, 0.5)).r;\n float diff = 1.0 + adjustCoeff - luma;\n texel.rgb = mix(texel.rgb, texel.rgb * diff, 0.5);\n\n // levels 2\n texel.r = texture2D(levels, vec2(texel.r, 0.5)).r;\n texel.g = texture2D(levels, vec2(texel.g, 0.5)).g;\n texel.b = texture2D(levels, vec2(texel.b, 0.5)).b;\n\n // slight saturation boost\n vec3 lumaFinal = vec3(dot(vec3(0.2126, 0.7152, 0.0722), texel.rgb));\n texel.rgb = mix(texel.rgb, lumaFinal, -0.1); \ntexel.rgb = mix(inputTexel.rgb, texel.rgb, strength);\n\ngl_FragColor = texel;\n}" | |
}, | |
{ | |
"filter": "IGCharmesVideoFilter", | |
"fragmentShader": "// exposure adjust\n texel.rgb = min(texel.rgb * 1.14, vec3(1.0));\n\n texel.r = texture2D(map, vec2(texel.r, 0.5)).r;\n texel.g = texture2D(map, vec2(texel.g, 0.5)).g;\n texel.b = texture2D(map, vec2(texel.b, 0.5)).b;", | |
"filterName": "Charmes", | |
"samplers": { | |
"map": "vogue_map.png" | |
}, | |
"borderName": "filterBorderPlainWhite.png", | |
"vertexShader": "", | |
"fullVertexShader": "attribute vec3 a_position; attribute vec2 a_texCoord; uniform mat4 u_contentTransform; uniform mat4 u_texCoordTransform; varying vec2 textureCoordinate; varying vec2 sourceTextureCoordinate; void main() { gl_Position = u_contentTransform * vec4(a_position, 1.0); textureCoordinate = a_texCoord + vec2(0.5); vec4 texel = u_texCoordTransform * vec4(a_texCoord, 0.0, 1.0); sourceTextureCoordinate = texel.xy / texel.w + vec2(0.5); }", | |
"fullFragmentShader": "precision mediump float;varying vec2 textureCoordinate; varying vec2 sourceTextureCoordinate;\n uniform float strength; \nuniform sampler2D map; \nuniform sampler2D s_texture; void main() { vec4 texel = texture2D(s_texture, sourceTextureCoordinate);vec4 inputTexel = texel;// exposure adjust\n texel.rgb = min(texel.rgb * 1.14, vec3(1.0));\n\n texel.r = texture2D(map, vec2(texel.r, 0.5)).r;\n texel.g = texture2D(map, vec2(texel.g, 0.5)).g;\n texel.b = texture2D(map, vec2(texel.b, 0.5)).b; \ntexel.rgb = mix(inputTexel.rgb, texel.rgb, strength);\n\ngl_FragColor = texel;\n}" | |
} | |
] |
I'm very thankful,
sorry, but do you have lux and structure shaders too?
Sorry, I do'not have it.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I'm very thankful,
sorry, but do you have lux and structure shaders too?