{"_id":"mapbox-glsl-optimizer","_rev":"408091","name":"mapbox-glsl-optimizer","description":"GLSL optimizer","dist-tags":{"latest":"0.1.3"},"maintainers":[{"name":"ansis","email":"ansis.brammanis@gmail.com"},{"name":"jfirebaugh","email":"john.firebaugh@gmail.com"},{"name":"kkaefer","email":"mail@kkaefer.com"},{"name":"mourner","email":"agafonkin@gmail.com"}],"time":{"modified":"2021-08-04T04:57:08.000Z","created":"2014-07-17T20:10:40.550Z","0.1.3":"2014-10-17T22:52:35.684Z","0.1.2":"2014-10-15T22:59:25.331Z","0.1.1":"2014-08-13T14:28:39.414Z","0.1.0":"2014-07-17T20:10:40.550Z"},"users":{},"author":{"name":"Aras Pranckevičius"},"repository":{"type":"git","url":"https://github.com/aras-p/glsl-optimizer.git"},"versions":{"0.1.3":{"name":"mapbox-glsl-optimizer","version":"0.1.3","description":"GLSL optimizer","main":"./lib/glslOptimizer.node","scripts":{"install":"node-pre-gyp install --fallback-to-build","test":"node tests/tests.js"},"repository":{"type":"git","url":"https://github.com/aras-p/glsl-optimizer.git"},"binary":{"module_name":"glslOptimizer","module_path":"./lib/","host":"https://mapbox-node-binary.s3.amazonaws.com","remote_path":"./{name}/v{version}/","package_name":"{node_abi}-{platform}-{arch}.tar.gz"},"keywords":["glsl","webgl","shader","optimize","optimizer","opengl","essl","es","opengles"],"author":{"name":"Aras Pranckevičius"},"license":"MIT","gypfile":true,"bugs":{"url":"https://github.com/aras-p/glsl-optimizer/issues"},"homepage":"https://github.com/aras-p/glsl-optimizer","directories":{"test":"tests"},"dependencies":{"nan":"~1.2.0","node-pre-gyp":"~0.5.19"},"devDependencies":{"aws-sdk":"~2.0.0-rc.19"},"gitHead":"3d752b56f03d9366bc9a04b88eced1b7813aaa4a","bundleDependencies":["node-pre-gyp"],"_id":"mapbox-glsl-optimizer@0.1.3","_shasum":"365cee83abb71fdf899d98680a0a9be9e42aa94e","_from":".","_npmVersion":"2.1.3","_nodeVersion":"0.10.32","_npmUser":{"name":"jfirebaugh","email":"john.firebaugh@gmail.com"},"maintainers":[{"name":"ansis","email":"ansis.brammanis@gmail.com"},{"name":"jfirebaugh","email":"john.firebaugh@gmail.com"},{"name":"kkaefer","email":"mail@kkaefer.com"},{"name":"mourner","email":"agafonkin@gmail.com"}],"dist":{"shasum":"365cee83abb71fdf899d98680a0a9be9e42aa94e","size":2078382,"noattachment":false,"key":"/mapbox-glsl-optimizer/-/mapbox-glsl-optimizer-0.1.3.tgz","tarball":"http://registry.cnpm.dingdandao.com/mapbox-glsl-optimizer/download/mapbox-glsl-optimizer-0.1.3.tgz"},"publish_time":1413586355684,"_cnpm_publish_time":1413586355684,"_hasShrinkwrap":false},"0.1.2":{"name":"mapbox-glsl-optimizer","version":"0.1.2","description":"GLSL optimizer","main":"./lib/glslOptimizer.node","scripts":{"install":"node-pre-gyp install --fallback-to-build","test":"node tests/tests.js"},"repository":{"type":"git","url":"https://github.com/aras-p/glsl-optimizer.git"},"binary":{"module_name":"glslOptimizer","module_path":"./lib/","host":"https://mapbox-node-binary.s3.amazonaws.com","remote_path":"./{name}/v{version}/","package_name":"{node_abi}-{platform}-{arch}.tar.gz"},"keywords":["glsl","webgl","shader","optimize","optimizer","opengl","essl","es","opengles"],"author":{"name":"Aras Pranckevičius"},"license":"MIT","gypfile":true,"bugs":{"url":"https://github.com/aras-p/glsl-optimizer/issues"},"homepage":"https://github.com/aras-p/glsl-optimizer","directories":{"test":"tests"},"dependencies":{"nan":"~1.2.0","node-pre-gyp":"~0.5.19"},"devDependencies":{"aws-sdk":"~2.0.0-rc.19"},"gitHead":"da875e605b83b72e28338827bf340b258c4a12e7","bundleDependencies":["node-pre-gyp"],"_id":"mapbox-glsl-optimizer@0.1.2","_shasum":"950892b7d0cd59d6b90141314c520abb071e99f3","_from":".","_npmVersion":"2.0.0","_npmUser":{"name":"jfirebaugh","email":"john.firebaugh@gmail.com"},"maintainers":[{"name":"ansis","email":"ansis.brammanis@gmail.com"},{"name":"jfirebaugh","email":"john.firebaugh@gmail.com"},{"name":"kkaefer","email":"mail@kkaefer.com"},{"name":"mourner","email":"agafonkin@gmail.com"}],"dist":{"shasum":"950892b7d0cd59d6b90141314c520abb071e99f3","size":7964967,"noattachment":false,"key":"/mapbox-glsl-optimizer/-/mapbox-glsl-optimizer-0.1.2.tgz","tarball":"http://registry.cnpm.dingdandao.com/mapbox-glsl-optimizer/download/mapbox-glsl-optimizer-0.1.2.tgz"},"publish_time":1413413965331,"_cnpm_publish_time":1413413965331,"_hasShrinkwrap":false},"0.1.1":{"name":"mapbox-glsl-optimizer","version":"0.1.1","description":"GLSL optimizer","main":"./lib/glslOptimizer.node","scripts":{"install":"node-pre-gyp install --fallback-to-build","test":"node tests/tests.js"},"repository":{"type":"git","url":"https://github.com/aras-p/glsl-optimizer.git"},"binary":{"module_name":"glslOptimizer","module_path":"./lib/","host":"https://mapbox-node-binary.s3.amazonaws.com","remote_path":"./{name}/v{version}/","package_name":"{node_abi}-{platform}-{arch}.tar.gz"},"keywords":["glsl","webgl","shader","optimize","optimizer","opengl","essl","es","opengles"],"author":{"name":"Aras Pranckevičius"},"license":"MIT","gypfile":true,"bugs":{"url":"https://github.com/aras-p/glsl-optimizer/issues"},"homepage":"https://github.com/aras-p/glsl-optimizer","directories":{"test":"tests"},"dependencies":{"nan":"~1.2.0","node-pre-gyp":"~0.5.19"},"devDependencies":{"aws-sdk":"~2.0.0-rc.19"},"bundleDependencies":["node-pre-gyp"],"_id":"mapbox-glsl-optimizer@0.1.1","dist":{"shasum":"f7cc03dc0846afc5f63da319159400cd6450f4f8","size":623546,"noattachment":false,"key":"/mapbox-glsl-optimizer/-/mapbox-glsl-optimizer-0.1.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/mapbox-glsl-optimizer/download/mapbox-glsl-optimizer-0.1.1.tgz"},"_from":".","_npmVersion":"1.3.11","_npmUser":{"name":"kkaefer","email":"kkaefer@gmail.com"},"maintainers":[{"name":"ansis","email":"ansis.brammanis@gmail.com"},{"name":"jfirebaugh","email":"john.firebaugh@gmail.com"},{"name":"kkaefer","email":"mail@kkaefer.com"},{"name":"mourner","email":"agafonkin@gmail.com"}],"publish_time":1407940119414,"_cnpm_publish_time":1407940119414,"_hasShrinkwrap":false},"0.1.0":{"name":"mapbox-glsl-optimizer","version":"0.1.0","description":"GLSL optimizer","main":"./lib/glslOptimizer.node","scripts":{"install":"node-pre-gyp install --fallback-to-build","test":"node tests/tests.js"},"repository":{"type":"git","url":"https://github.com/aras-p/glsl-optimizer.git"},"binary":{"module_name":"glslOptimizer","module_path":"./lib/","host":"https://mapbox-glsl-optimizer.s3.amazonaws.com","remote_path":"./{name}/v{version}","package_name":"{node_abi}-{platform}-{arch}.tar.gz"},"keywords":["glsl","webgl","shader","optimize","optimizer","opengl","essl","es","opengles"],"author":{"name":"Aras Pranckevičius"},"license":"MIT","gypfile":true,"bugs":{"url":"https://github.com/aras-p/glsl-optimizer/issues"},"homepage":"https://github.com/aras-p/glsl-optimizer","directories":{"test":"tests"},"dependencies":{"nan":"~1.2.0","node-pre-gyp":"~0.5.19"},"_id":"mapbox-glsl-optimizer@0.1.0","dist":{"shasum":"db0124f39e4eedade9a7dbd81718c5074157d3cd","size":944965,"noattachment":false,"key":"/mapbox-glsl-optimizer/-/mapbox-glsl-optimizer-0.1.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/mapbox-glsl-optimizer/download/mapbox-glsl-optimizer-0.1.0.tgz"},"_from":".","_npmVersion":"1.3.11","_npmUser":{"name":"kkaefer","email":"kkaefer@gmail.com"},"maintainers":[{"name":"ansis","email":"ansis.brammanis@gmail.com"},{"name":"jfirebaugh","email":"john.firebaugh@gmail.com"},{"name":"kkaefer","email":"mail@kkaefer.com"},{"name":"mourner","email":"agafonkin@gmail.com"}],"publish_time":1405627840550,"_cnpm_publish_time":1405627840550,"_hasShrinkwrap":false}},"readme":"GLSL optimizer\n==============\n\nA C++ library that takes GLSL shaders, does some GPU-independent optimizations on them\nand outputs GLSL back. Optimizations are function inlining, dead code removal, copy propagation,\nconstant folding, constant propagation, arithmetic optimizations and so on.\n\nApparently quite a few mobile platforms are pretty bad at optimizing GLSL shaders; and\nunfortunately they *also* lack offline shader compilers. So using a GLSL optimizer offline\nbefore can make the shader run much faster on a platform like that. See performance numbers\nin [this blog post](http://aras-p.info/blog/2010/09/29/glsl-optimizer/).\n\nAlmost all actual code is [Mesa 3D's GLSL](http://cgit.freedesktop.org/mesa/mesa/log/)\ncompiler; all this library does is spits out optimized GLSL back, and adds GLES type precision\nhandling to the optimizer.\n\nThis GLSL optimizer is made for [Unity's](http://unity3d.com/) purposes and is built-in\nstarting with Unity 3.0.\n\nGLSL Optimizer is licensed according to the terms of the MIT license.\n\nSee badly maintained [change log](Changelog.md).\n\n\nUsage\n-----\n\nVisual Studio 2010 (Windows, x86/x64) and Xcode 5+ (Mac, i386) project files for a static\nlibrary are provided in `projects/vs2010/glsl_optimizer.sln` and `projects/xcode5/glsl_optimizer_lib`\nrespectively.\n\n> Note: only the VS and Xcode project files are maintained and should work at any time.\n> There's also a cmake and gyp build system for Linux et al., and some stuff in contrib folder -\n> all that may or might not work.\n\nFor Linux you can use cmake. Just type \"cmake . && make\" in the root directory.\nThis will build the optimizer library and some executable binaries.\n\nInterface for the library is `src/glsl/glsl_optimizer.h`. General usage is:\n \n\tctx = glslopt_initialize();\n\tfor (lots of shaders) {\n\t\tshader = glslopt_optimize (ctx, shaderType, shaderSource, options);\n\t\tif (glslopt_get_status (shader)) {\n\t\t\tnewSource = glslopt_get_output (shader);\n\t\t} else {\n\t\t\terrorLog = glslopt_get_log (shader);\n\t\t}\n\t\tglslopt_shader_delete (shader);\n\t}\n\tglslopt_cleanup (ctx);\n\n\nTests\n-----\n\nThere's a testing suite for catching regressions, see `tests` folder. In VS, build\nand run `glsl_optimizer_tests` project; in Xcode use `projects/xcode5/glsl_optimizer_tests`\nproject. The test executable requires path to the `tests` folder as an argument.\n\nEach test comes as three text files; input, expected IR dump and expected optimized\nGLSL dump.\n\nIf you're making changes to the project and want pull requests accepted easier, I'd\nappreciate if there would be no test suite regressions. If you are implementing a\nfeature, it would be cool to add tests to cover it as well!\n\n\nNotes\n-----\n\n* GLSL versions 1.10 and 1.20 are supported. 1.10 is the default, use #version 120 to specify \n1.20.\n* GLSL ES versions 1.00 and 3.00 are supported.\n\n\nDev Notes\n---------\n\nPulling Mesa upstream:\n\n    git fetch upstream\n    git merge upstream/master\n    sh removeDeletedByUs.sh\n    # inspect files, git rm unneeded ones, fix conflicts etc.\n    # git commit\n    \nRebuilding flex/bison parsers:\n\n* When .y/.l files are changed, the parsers are *not* rebuilt automatically,\n* Run ./generateParsers.sh to do that. You'll need bison & flex (on Mac, do \"Install Command Line Tools\" from Xcode)\n* I use bison 2.3 and flex 2.5.35 (in OS X 10.8/10.9)\n\n","_attachments":{},"homepage":"https://github.com/aras-p/glsl-optimizer","bugs":{"url":"https://github.com/aras-p/glsl-optimizer/issues"},"license":"MIT"}