{"action":"created","issue":{"url":"https://api.github.com/repos/KhronosGroup/glTF/issues/36","labels_url":"https://api.github.com/repos/KhronosGroup/glTF/issues/36/labels{/name}","comments_url":"https://api.github.com/repos/KhronosGroup/glTF/issues/36/comments","events_url":"https://api.github.com/repos/KhronosGroup/glTF/issues/36/events","html_url":"https://github.com/KhronosGroup/glTF/issues/36","id":12315169,"number":36,"title":"Minify GLSL","user":{"login":"pjcozzi","id":782098,"avatar_url":"https://avatars.githubusercontent.com/u/782098?v=3","gravatar_id":"","url":"https://api.github.com/users/pjcozzi","html_url":"https://github.com/pjcozzi","followers_url":"https://api.github.com/users/pjcozzi/followers","following_url":"https://api.github.com/users/pjcozzi/following{/other_user}","gists_url":"https://api.github.com/users/pjcozzi/gists{/gist_id}","starred_url":"https://api.github.com/users/pjcozzi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pjcozzi/subscriptions","organizations_url":"https://api.github.com/users/pjcozzi/orgs","repos_url":"https://api.github.com/users/pjcozzi/repos","events_url":"https://api.github.com/users/pjcozzi/events{/privacy}","received_events_url":"https://api.github.com/users/pjcozzi/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/KhronosGroup/glTF/labels/converter","name":"converter","color":"02e10c"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":6,"created_at":"2013-03-22T11:23:34Z","updated_at":"2015-09-20T21:30:58Z","closed_at":null,"body":"To reduce asset size, the converter should have an option (off by default) to minify the generated GLSL.\r\n\r\nRemoving whitespace and comments is obvious (that is actually all my WebGL engine does now), but minification can be much more aggressive by renaming functions, variables, and even uniforms (and the glTF JSON) in the extreme case.\r\n\r\nWe can investigate some tools:\r\n* https://code.google.com/p/glsl-unit/wiki/UsingTheCompiler ([online version](http://glslunit.appspot.com/compiler.html), [discussion](https://groups.google.com/forum/?fromgroups#!topic/webgl-dev-list/RkGgA0t9IUA))\r\n* http://www.ctrl-alt-test.fr/?page_id=7 ([online version](http://ctrl-alt-test.fr/minifier/))\r\n* https://github.com/chrisdickinson/glslmin\r\n* Cesium script for removing whitespace and comments.  https://github.com/AnalyticalGraphicsInc/cesium/blob/b19/Tools/buildTasks/extractShaderComments.js\r\n"},"comment":{"url":"https://api.github.com/repos/KhronosGroup/glTF/issues/comments/141835989","html_url":"https://github.com/KhronosGroup/glTF/issues/36#issuecomment-141835989","issue_url":"https://api.github.com/repos/KhronosGroup/glTF/issues/36","id":141835989,"user":{"login":"pjcozzi","id":782098,"avatar_url":"https://avatars.githubusercontent.com/u/782098?v=3","gravatar_id":"","url":"https://api.github.com/users/pjcozzi","html_url":"https://github.com/pjcozzi","followers_url":"https://api.github.com/users/pjcozzi/followers","following_url":"https://api.github.com/users/pjcozzi/following{/other_user}","gists_url":"https://api.github.com/users/pjcozzi/gists{/gist_id}","starred_url":"https://api.github.com/users/pjcozzi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pjcozzi/subscriptions","organizations_url":"https://api.github.com/users/pjcozzi/orgs","repos_url":"https://api.github.com/users/pjcozzi/repos","events_url":"https://api.github.com/users/pjcozzi/events{/privacy}","received_events_url":"https://api.github.com/users/pjcozzi/received_events","type":"User","site_admin":false},"created_at":"2015-09-20T21:30:58Z","updated_at":"2015-09-20T21:30:58Z","body":"Cool, thanks for sharing @zz85!"}}