{"_id":"glsl-lut","_rev":"16-ad93311bbf603a0d02be951ca7a7a1c6","name":"glsl-lut","description":"lookup table color transforms for glslify","dist-tags":{"latest":"1.1.3"},"versions":{"1.0.0":{"name":"glsl-lut","version":"1.0.0","keywords":["glslify glsl lut lookup table color transform matrix rgb rgba filter instagram curves"],"author":{"name":"Matt DesLauriers","email":"dave.des@gmail.com"},"license":"MIT","_id":"glsl-lut@1.0.0","maintainers":[{"name":"mattdesl","email":"dave.des@gmail.com"}],"homepage":"https://github.com/mattdesl/glsl-lut","bugs":{"url":"https://github.com/mattdesl/glsl-lut/issues"},"dist":{"shasum":"2ba74294a8ad126d1d3b38296bc09643a8cfc9bb","tarball":"https://registry.npmjs.org/glsl-lut/-/glsl-lut-1.0.0.tgz","integrity":"sha512-hrSfjePhMGeid71WEZugHWf4hBh4g1Fesxi6JuY60jS6bprAvLxIhZ8YguK0VX5UWKJy2kdriEISA2kOWXKRXA==","signatures":[{"sig":"MEUCIQCWh1PTGwCYjDSja2ZccpcnYo2g5ucCdHKXhN2mBpUQ2gIgel+vEcuhkZ3pFR4tmalLyAKux2KS3d2vl0/sWELtN3g=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"index.js","_from":".","scripts":{"dev":"beefy index.js --cwd example --live","dist":"browserify example/index.js -o example/static/bundle.js","test":"tape test.js"},"_npmUser":{"name":"mattdesl","email":"dave.des@gmail.com"},"testling":{"files":"test.js","browsers":["ie/6..latest","chrome/22..latest","firefox/16..latest","safari/latest","opera/11.0..latest","iphone/6","ipad/6","android-browser/latest"]},"browserify":{"transform":["glslify"]},"repository":{"url":"git://github.com/mattdesl/glsl-lut.git","type":"git"},"_npmVersion":"1.3.24","description":"lookup table color transforms for glslify","directories":{"example":"example"},"dependencies":{},"devDependencies":{"lena":"~1.0.0","tape":"~2.13.2","gl-now":"~1.3.1","glslify":"~1.4.0","gl-context":"~0.1.0","gl-texture2d":"~1.0.1","a-big-triangle":"0.0.0"}},"1.0.1":{"name":"glsl-lut","version":"1.0.1","keywords":["glslify","glsl","webgl","shader","color","transform","lookup","table","lut","instagram","filter","curves","brightness","contrast","saturation","hue","levels","grayscale"],"author":{"name":"Matt DesLauriers","email":"dave.des@gmail.com"},"license":"MIT","_id":"glsl-lut@1.0.1","maintainers":[{"name":"mattdesl","email":"dave.des@gmail.com"}],"homepage":"https://github.com/mattdesl/glsl-lut","bugs":{"url":"https://github.com/mattdesl/glsl-lut/issues"},"dist":{"shasum":"69a6430b62edc7fb56972fdc73ecf32351a6c49e","tarball":"https://registry.npmjs.org/glsl-lut/-/glsl-lut-1.0.1.tgz","integrity":"sha512-Q4xOuslsLY4FkIsYnY+aJJnBY7ffW2nFlzaR4ragc0wusR/G6thE/Hf3WTk/ee+aKxkmeJvnuLkCVACCvg1Ecg==","signatures":[{"sig":"MEQCIAXWBELodxW4pCYN0genncZlZBE9gwex48HqICRdbXhIAiBCIN6fW/CIY5KIaOmWLrZYEikNMgKdS76zaCOCLtG9Sg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"index.js","_from":".","scripts":{"dev":"beefy index.js --cwd example --live","dist":"browserify example/index.js -o example/static/bundle.js","test":"tape test.js"},"_npmUser":{"name":"mattdesl","email":"dave.des@gmail.com"},"testling":{"files":"test.js","browsers":["ie/6..latest","chrome/22..latest","firefox/16..latest","safari/latest","opera/11.0..latest","iphone/6","ipad/6","android-browser/latest"]},"browserify":{"transform":["glslify"]},"repository":{"url":"git://github.com/mattdesl/glsl-lut.git","type":"git"},"_npmVersion":"1.3.24","description":"lookup table color transforms for glslify","directories":{"example":"example"},"dependencies":{},"devDependencies":{"lena":"~1.0.0","tape":"~2.13.2","gl-now":"~1.3.1","glslify":"~1.4.0","gl-context":"~0.1.0","gl-texture2d":"~1.0.1","a-big-triangle":"0.0.0"}},"1.0.2":{"name":"glsl-lut","version":"1.0.2","keywords":["glslify","glsl","webgl","shader","color","transform","lookup","table","lut","instagram","filter","curves","brightness","contrast","saturation","hue","levels","grayscale"],"author":{"name":"Matt DesLauriers","email":"dave.des@gmail.com"},"license":"MIT","_id":"glsl-lut@1.0.2","maintainers":[{"name":"mattdesl","email":"dave.des@gmail.com"}],"homepage":"https://github.com/mattdesl/glsl-lut","bugs":{"url":"https://github.com/mattdesl/glsl-lut/issues"},"dist":{"shasum":"722c4068d4de990eea99e8ee28d1079921dd3148","tarball":"https://registry.npmjs.org/glsl-lut/-/glsl-lut-1.0.2.tgz","integrity":"sha512-S9pbRafrti5spNmaAqulS5TDkLN/JMwcB1L2H412otSkrSy414WDpupyoXl+ukAm+nwGl670ygpbK4016hN68g==","signatures":[{"sig":"MEUCIFZ8Vi36mx0BFNl2Hc44jwgDJU2xt1jZERb0PHFTpKfwAiEAv9da+gMhEvl3pW/7AvXK7YHd1Z+hmmDiwohk09psdnw=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"index.js","_from":".","scripts":{"dev":"beefy index.js --cwd example --live","dist":"browserify example/index.js -o example/static/bundle.js","test":"tape test.js"},"_npmUser":{"name":"mattdesl","email":"dave.des@gmail.com"},"testling":{"files":"test.js","browsers":["ie/6..latest","chrome/22..latest","firefox/16..latest","safari/latest","opera/11.0..latest","iphone/6","ipad/6","android-browser/latest"]},"browserify":{"transform":["glslify"]},"repository":{"url":"git://github.com/mattdesl/glsl-lut.git","type":"git"},"_npmVersion":"1.3.24","description":"lookup table color transforms for glslify","directories":{"example":"example"},"dependencies":{},"devDependencies":{"lena":"~1.0.0","tape":"~2.13.2","gl-now":"~1.3.1","glslify":"~1.4.0","gl-context":"~0.1.0","gl-texture2d":"~1.0.1","a-big-triangle":"0.0.0"}},"1.0.3":{"name":"glsl-lut","version":"1.0.3","keywords":["glslify","glsl","webgl","shader","color","transform","lookup","table","lut","instagram","filter","curves","brightness","contrast","saturation","hue","levels","grayscale"],"author":{"name":"Matt DesLauriers","email":"dave.des@gmail.com"},"license":"MIT","_id":"glsl-lut@1.0.3","maintainers":[{"name":"mattdesl","email":"dave.des@gmail.com"}],"homepage":"https://github.com/mattdesl/glsl-lut","bugs":{"url":"https://github.com/mattdesl/glsl-lut/issues"},"dist":{"shasum":"f6374dfd822a2d5c0f91d5a649837af1d5d8b11c","tarball":"https://registry.npmjs.org/glsl-lut/-/glsl-lut-1.0.3.tgz","integrity":"sha512-IjhgbqUx0Dn9xU+q2+HvrIoV8Ol8aFzcAG7KCgQUQiPRBrIZfmnm5oDQY4y+GAFcU+Vnl5XuuNB3xaccr82vKA==","signatures":[{"sig":"MEUCIQCI5cQcAYQtmBUoNj7mjbRQvhY4k4XEGlvMWXowFNrY6wIgfO5z6xexjcfGjYFrUKYQ9DeY3dDBymsOrW0dWTk0QXk=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"index.js","_from":".","scripts":{"dev":"beefy index.js --cwd example --live","dist":"browserify example/index.js -o example/static/bundle.js","test":"tape test.js"},"_npmUser":{"name":"mattdesl","email":"dave.des@gmail.com"},"testling":{"files":"test.js","browsers":["ie/6..latest","chrome/22..latest","firefox/16..latest","safari/latest","opera/11.0..latest","iphone/6","ipad/6","android-browser/latest"]},"browserify":{"transform":["glslify"]},"repository":{"url":"git://github.com/mattdesl/glsl-lut.git","type":"git"},"_npmVersion":"1.3.24","description":"lookup table color transforms for glslify","directories":{"example":"example"},"dependencies":{},"devDependencies":{"lena":"~1.0.0","tape":"~2.13.2","gl-now":"~1.3.1","glslify":"~1.4.0","gl-context":"~0.1.0","gl-texture2d":"~1.0.1","a-big-triangle":"0.0.0"}},"1.1.0":{"name":"glsl-lut","version":"1.1.0","keywords":["glslify","glsl","webgl","shader","color","transform","lookup","table","lut","instagram","filter","curves","brightness","contrast","saturation","hue","levels","grayscale"],"author":{"name":"Matt DesLauriers","email":"dave.des@gmail.com"},"license":"MIT","_id":"glsl-lut@1.1.0","maintainers":[{"name":"mattdesl","email":"dave.des@gmail.com"}],"homepage":"https://github.com/mattdesl/glsl-lut","bugs":{"url":"https://github.com/mattdesl/glsl-lut/issues"},"bin":{"glsl-lut":"./bin/cmd.js"},"dist":{"shasum":"b4919a12ab71d40e5d7c2e4922839749e3dcb03e","tarball":"https://registry.npmjs.org/glsl-lut/-/glsl-lut-1.1.0.tgz","integrity":"sha512-hsjmo3MLWrGz/Fgh0oW1VMNIyGnqB4aB4PxoWKQQ/9w/r0VE3aQev9t5W0G6UJBlq5//FScfPxNB8f9Zk8G67w==","signatures":[{"sig":"MEQCIGf41JCUsHwm/RNPshXHQI//wxQqHHQe5ki49JPVXeugAiAE5Eqk8/mn1vb5IjQLzdyPT36b8i1Df3RTmwYNv7TK8A==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"index.js","_from":".","_shasum":"b4919a12ab71d40e5d7c2e4922839749e3dcb03e","gitHead":"53abe872ead20c4e4188101c623c41ee6256b356","scripts":{"test":"tape test.js","build":"browserify example/index.js -t glslify -o example/static/bundle.js","start":"budo example/index.js --dir example --live -t glslify | garnish"},"_npmUser":{"name":"mattdesl","email":"dave.des@gmail.com"},"testling":{"files":"test.js","browsers":["ie/6..latest","chrome/22..latest","firefox/16..latest","safari/latest","opera/11.0..latest","iphone/6","ipad/6","android-browser/latest"]},"repository":{"url":"git://github.com/mattdesl/glsl-lut.git","type":"git"},"_npmVersion":"2.8.2","description":"lookup table color transforms for glslify","directories":{"example":"example"},"_nodeVersion":"0.10.32","dependencies":{},"devDependencies":{"budo":"^3.0.4","lena":"~1.0.0","tape":"~2.13.2","gl-now":"~1.3.1","garnish":"^2.1.3","glslify":"^2.1.2","watchify":"^3.1.1","gl-shader":"^4.0.1","browserify":"^9.0.8","gl-context":"~0.1.0","gl-texture2d":"~1.0.1","a-big-triangle":"0.0.0"}},"1.1.1":{"name":"glsl-lut","version":"1.1.1","keywords":["glslify","glsl","webgl","shader","color","transform","lookup","table","lut","instagram","filter","curves","brightness","contrast","saturation","hue","levels","grayscale"],"author":{"name":"Matt DesLauriers","email":"dave.des@gmail.com"},"license":"MIT","_id":"glsl-lut@1.1.1","maintainers":[{"name":"mattdesl","email":"dave.des@gmail.com"}],"homepage":"https://github.com/mattdesl/glsl-lut","bugs":{"url":"https://github.com/mattdesl/glsl-lut/issues"},"bin":{"glsl-lut":"./bin/cmd.js"},"dist":{"shasum":"3cedc71e670f2a5c4c54890313f672b9f85e7361","tarball":"https://registry.npmjs.org/glsl-lut/-/glsl-lut-1.1.1.tgz","fileCount":7,"integrity":"sha512-FBlEzcGnIK5LYwGKELdkQt7dzQHD/6jndH7+pr0ARsuu9/omAsRX+LqGQ8wOZHoclJezLh4d9eK8Rvntgsuu9A==","signatures":[{"sig":"MEUCIQCWxWEjjMVrxqU8ZV9gYcisXTQa6rTThKHKRWXJ8H3AwgIgankzRqqMUkckLS5yyzzEGFobzDxseYWeXIbwuE6nlwA=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":9108,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJb+yk+CRA9TVsSAnZWagAAJ64P/ielu7P39TYZtq6YvDyG\nbM+VV2cTCK7BOk7OXuLh4nmru8XoDbLHEsf8tm03iHi7pby19dCm6CihTkkC\n1rxxOYspqOSm4Lyx/ceDWFGWoin09OJqRqkPmBgo16qmNyRdG7BM224C+cy4\nvd7q2et/k7n9gVAZ/5HunfNk8tCl4oe9MBTHWgofWrPsgdKzup5n3DFV6hrv\n9IuqWWLN/LySe4lHmveTCgToVnm6CU9npTvs2GvOjivjtClUOiQyYxPEEcO0\nUmn8fikkfu9F6Ezfd0cBTpbWvhla5naWtXdh85dEz9LyBIMt/peVdCXZL+cX\nuJZkJsWnwUuVohE0bYHwAwDls0J2dOJLjdi+GfEKliAda2cb/6ucAZtd3km6\nnaflBZNERw+8cUlcPevkPYtJhLLqcoyMit82O0C6Flp8QtwSFQRrSwSBuz7x\nWQYZY7JfczVXUbk3zRJ2HqUtUIKcI+IsDK7hHRwqOlOeO1aDFvQUwzYcdd4m\nP5xa3H8tGPBPRjfyz5roM775rhaDvwdJvjrS+bgCwB7CKMM9iziiO19Kdq/t\nBg1OM10xv7ZFWyo0E4YdQHLKai79vmo1DE7G/OaXU2EFJtGZ8bGHnTP2Cai4\ngZJwxHB78PbOb+e1u4X7vgMaQktVDvoosNp49ohiLUlp6sxoparFhgXjHVpU\nWXG4\r\n=PvYl\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","gitHead":"2a4875d15d74dd533cf488ecfcd06d1301ea3a84","scripts":{"test":"tape test.js","build":"browserify example/index.js -t glslify -o example/static/bundle.js","start":"budo example/index.js --dir example --live -t glslify | garnish"},"_npmUser":{"name":"mattdesl","email":"dave.des@gmail.com"},"testling":{"files":"test.js","browsers":["ie/6..latest","chrome/22..latest","firefox/16..latest","safari/latest","opera/11.0..latest","iphone/6","ipad/6","android-browser/latest"]},"repository":{"url":"git://github.com/mattdesl/glsl-lut.git","type":"git"},"_npmVersion":"6.1.0","description":"lookup table color transforms for glslify","directories":{"example":"example"},"_nodeVersion":"8.10.0","dependencies":{},"_hasShrinkwrap":false,"devDependencies":{"budo":"^3.0.4","lena":"~1.0.0","tape":"~2.13.2","gl-now":"~1.3.1","garnish":"^2.1.3","glslify":"^2.1.2","watchify":"^3.1.1","gl-shader":"^4.0.1","browserify":"^9.0.8","gl-context":"~0.1.0","gl-texture2d":"~1.0.1","a-big-triangle":"0.0.0"},"_npmOperationalInternal":{"tmp":"tmp/glsl-lut_1.1.1_1543186749479_0.7044968288173192","host":"s3://npm-registry-packages"}},"1.1.2":{"name":"glsl-lut","version":"1.1.2","keywords":["glslify","glsl","webgl","shader","color","transform","lookup","table","lut","instagram","filter","curves","brightness","contrast","saturation","hue","levels","grayscale"],"author":{"name":"Matt DesLauriers","email":"dave.des@gmail.com"},"license":"MIT","_id":"glsl-lut@1.1.2","maintainers":[{"name":"mattdesl","email":"dave.des@gmail.com"}],"homepage":"https://github.com/mattdesl/glsl-lut","bugs":{"url":"https://github.com/mattdesl/glsl-lut/issues"},"bin":{"glsl-lut":"bin/cmd.js"},"dist":{"shasum":"f8c284d69d16eefd5e664437523e3368a83de913","tarball":"https://registry.npmjs.org/glsl-lut/-/glsl-lut-1.1.2.tgz","fileCount":7,"integrity":"sha512-hCWeSfHO8sGsW7L5nIqxxIhA0l110cVgNHQ6+pwO9RfNqhjRNj2+HKSzxm3/bfaCtHn/3t69tegnkM9gWsOdAA==","signatures":[{"sig":"MEQCIAp26bUnh8NDRQrMHH8YfhoVBDK/I7GjlQ0D9TflSsFgAiA+QfhzukyBEyOXKo4667bCEOvkF2unNLGKwroxJoHpWg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":9546},"main":"index.js","gitHead":"3909991121cd5fa505fa4c97c1ab910884cfb164","scripts":{"test":"tape test.js","build":"browserify example/index.js -t glslify -o example/static/bundle.js","start":"budo example/index.js --dir example --live -t glslify | garnish"},"_npmUser":{"name":"mattdesl","email":"dave.des@gmail.com"},"testling":{"files":"test.js","browsers":["ie/6..latest","chrome/22..latest","firefox/16..latest","safari/latest","opera/11.0..latest","iphone/6","ipad/6","android-browser/latest"]},"repository":{"url":"git://github.com/mattdesl/glsl-lut.git","type":"git"},"_npmVersion":"10.5.2","description":"lookup table color transforms for glslify","directories":{"example":"example"},"_nodeVersion":"20.13.1","_hasShrinkwrap":false,"devDependencies":{"budo":"^3.0.4","pako":"^2.1.0","tape":"~2.13.2","gl-now":"~1.3.1","garnish":"^2.1.3","glslify":"^2.1.2","watchify":"^3.1.1","gl-shader":"^4.0.1","png-tools":"^1.0.4","browserify":"^9.0.8","gl-context":"~0.1.0","gl-texture2d":"~1.0.1","a-big-triangle":"0.0.0"},"_npmOperationalInternal":{"tmp":"tmp/glsl-lut_1.1.2_1718190797169_0.3428918574646045","host":"s3://npm-registry-packages"}},"1.1.3":{"name":"glsl-lut","version":"1.1.3","description":"lookup table color transforms for glslify","main":"index.js","license":"MIT","author":{"name":"Matt DesLauriers","email":"dave.des@gmail.com"},"devDependencies":{"a-big-triangle":"0.0.0","browserify":"^9.0.8","budo":"^3.0.4","garnish":"^2.1.3","gl-context":"~0.1.0","gl-now":"~1.3.1","gl-shader":"^4.0.1","gl-texture2d":"~1.0.1","glslify":"^2.1.2","pako":"^2.1.0","png-tools":"^1.0.4","tape":"~2.13.2","watchify":"^3.1.1"},"bin":{"glsl-lut":"bin/cmd.js"},"scripts":{"test":"tape test.js","start":"budo example/index.js --dir example --live -t glslify | garnish","build":"browserify example/index.js -t glslify -o example/static/bundle.js"},"testling":{"files":"test.js","browsers":["ie/6..latest","chrome/22..latest","firefox/16..latest","safari/latest","opera/11.0..latest","iphone/6","ipad/6","android-browser/latest"]},"repository":{"type":"git","url":"git://github.com/mattdesl/glsl-lut.git"},"homepage":"https://github.com/mattdesl/glsl-lut","bugs":{"url":"https://github.com/mattdesl/glsl-lut/issues"},"directories":{"example":"example"},"keywords":["glslify","glsl","webgl","shader","color","transform","lookup","table","lut","instagram","filter","curves","brightness","contrast","saturation","hue","levels","grayscale"],"_id":"glsl-lut@1.1.3","gitHead":"955ebfc01503cf12c535dd6d0a383066a960a066","_nodeVersion":"20.13.1","_npmVersion":"10.5.2","dist":{"integrity":"sha512-W4IR7pw6pqZztzTCmhRnkxsZZ9vGg03GJI8Pma+Kttt28jRrWu/OqotJJiia0PnbW59Dya1egbL4E2A8uY0clQ==","shasum":"d7570cf2004d05f90c91f990b72becc888560a18","tarball":"https://registry.npmjs.org/glsl-lut/-/glsl-lut-1.1.3.tgz","fileCount":7,"unpackedSize":9546,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIBMRyCB381UoW9Vbg8XkTMPRSYhQ6wb955g9DrO5zH6UAiBD9dmlpesGP27oJ8EaFas5NIz/Vd1W3zFyW7anzgw8vg=="}]},"_npmUser":{"name":"mattdesl","email":"dave.des@gmail.com"},"maintainers":[{"name":"mattdesl","email":"dave.des@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/glsl-lut_1.1.3_1718190825145_0.5416767727085885"},"_hasShrinkwrap":false}},"time":{"created":"2014-06-08T03:53:02.374Z","modified":"2024-06-12T11:13:45.493Z","1.0.0":"2014-06-08T03:53:02.374Z","1.0.1":"2014-06-08T03:58:14.176Z","1.0.2":"2014-06-08T04:01:48.753Z","1.0.3":"2014-06-08T04:33:15.156Z","1.1.0":"2015-04-18T00:31:15.627Z","1.1.1":"2018-11-25T22:59:09.565Z","1.1.2":"2024-06-12T11:13:17.304Z","1.1.3":"2024-06-12T11:13:45.304Z"},"maintainers":[{"name":"mattdesl","email":"dave.des@gmail.com"}],"author":{"name":"Matt DesLauriers","email":"dave.des@gmail.com"},"repository":{"type":"git","url":"git://github.com/mattdesl/glsl-lut.git"},"keywords":["glslify","glsl","webgl","shader","color","transform","lookup","table","lut","instagram","filter","curves","brightness","contrast","saturation","hue","levels","grayscale"],"license":"MIT","homepage":"https://github.com/mattdesl/glsl-lut","bugs":{"url":"https://github.com/mattdesl/glsl-lut/issues"},"readme":"# glsl-lut [![unstable](https://badges.github.io/stability-badges/dist/unstable.svg)](https://github.com/badges/stability-badges)\n\n![ABTest](https://github.com/mattdesl/glsl-lut/assets/1383811/28f0efce-f89a-4c44-8028-2f19f01094c0)\n\n[Demo here](https://mattdesl.github.io/glsl-lut/example/demo.html)\n\nUse a texture as a lookup table to apply color transforms in a shader. Original implementation from GPUImage, see [here](https://liovch.blogspot.ca/2012/07/add-instagram-like-effects-to-your-ios.html). For more details on the concept, see [here](https://developer.nvidia.com/gpugems/GPUGems2/gpugems2_chapter24.html).\n\nThis is geared towards OpenGL ES, so no 3D textures are used, and the lookup table is 512x512 (using every 4th color).\n\n## Usage\n\n[![NPM](https://nodei.co/npm/glsl-lut.png)](https://nodei.co/npm/glsl-lut/)\n\nFirst, grab the original (un-altered) lookup table from the [image](image) folder, or with the [CLI](#cli).\n\nThen you can apply any filters with Photoshop or at runtime to the lookup table image. These can be things like curves, levels, grayscale, etc. Each transform must be independent of surrounding pixels (no blurs, median, etc).\n\nIn your shader, sample the lookup texture (`uLookup` below) and pass the original `vec4` color to the transform method.\n\n```glsl\n\nuniform sampler2D uLookup;\n\n#pragma glslify: transform = require('glsl-lut')\n\n...\n    vec4 original = texture2D(uTexture, vUv);\n\tgl_FragColor = transform(original, uLookup);\n```\n\n> ❗**Important**: Make sure to set `TEXTURE_MIN_FILTER` and `TEXTURE_MAG_FILTER` to `NEAREST` on the lookup table texture.\n\n## Flipped Y Lookup\n\nDepending on your environment, the Y texture coordinate may need to be inverted during the lookup to get the correct color output. If your colours look messed up, this is most likely the case. Require the inverted function like so:\n\n```\n#pragma glslify: transform = require(glsl-lut/flipY)\n```\n\n## Defines\n\nRequiring `glsl-lut/flipY` is the same as making a define for `LUT_FLIP_Y`. You can also define `LUT_NO_CLAMP` before requiring the function and the incoming texture color will not have a `clamp(c, 0.0, 1.0)` operation applied. This may be useful if you plan to take advantage of hardware texture wrapping.\n\n## CLI\n\nYou can also use this tool as a command-line application to create a new (default) lookup table PNG image.\n\n```sh\nnpm install -g glsl-lut\n```\n\nThen:\n\n```sh\nglsl-lut > images/lut.png\n```\n\n## LUT Generation\n\nYou can also generate the LUT in software, for example see [example/generate.mjs](./example/generate.mjs) (requires node@v20.11 or higher) which generates a new LUT and writes the PNG to disk. This gives you the option to create specific filtering, for example \"desaturate all colours some distance from a target hue in OKLAB color space,\" which is difficult to achieve with just Photoshop colour adjustments.\n\n<sup>See [this file](https://github.com/BradLarson/GPUImage/blob/master/framework/Source/GPUImageLookupFilter.h) for further details on generating a lookup table programmatically.</sup>\n\n## License\n\nMIT, see [LICENSE.md](https://github.com/mattdesl/glsl-lut/blob/master/LICENSE.md) for details.\n","readmeFilename":"README.md","users":{"mystaticself":true}}