Yes, they had the plain text shader files embedded in their app, easily extractable. It's been like that since they first released 2.0. Path has (or had) them embedded, too.
It's still their IP though, and publishing them as "open source" is unethical and probably illegal. Just because something is feasible doesn't mean you should do it.
The GPUImage-based execution environment is fine, but you should remove these shaders ASAP.
Wanted to follow up and say that while including the proprietary Instagram shaders is wrong, the author did a nice job with this.
We're currently working on some filtering stuff using GPUImage as well, and it's nice to see this stuff progress.
One filter that is missing here BTW is Lux, which is Instagram's equivalent of the Camera+ Clarity filter. The reason (I suspect) is that the Lux "filter" is actually not implemented using shaders, but rather CoreGraphics.
Would love to hear your take on it if you know more.
Having explored a lot of app bundles this way, I can report that many iOS apps have shaders and other similar files (e.g., plists, HTML files) stored as plain text in the bundle.
This kind of spelunking can be a good way to learn from other developers about how to approach some problems. However, I agree with other commenters that it would be morally shaky to re-use any of another app's files in my own app.
To split hairs even further, the source is not _open_ so much as _publicly available_. There is a big difference. "Open source" is a term of art with a specific set of legal requirements attached to it. If this code is illegally published from closed source code without permission it doesn't meet the definition of "open" that the term of art implies.
I don't get it -- what's the point? I'm all for reversing for curiosity reasons, but releasing their source isn't cool, IMO. And what's worse is that this stuff really isn't that interesting; these sorts of filters are trivial to come up with on your own. For instance, I whipped up a set of WebGL filters for Boot2Gecko's camera app in a matter of an hour. (If you're curious, you can see a demo at http://demoseen.com/filters/ -- Firefox only, due to laziness.)
Now, a project that compiled a nice list of good filters, that'd be really cool. But this just isn't OK.
Diwup, perhaps you want to take down your published hack ASAP. Just because Instagram did not obfuscate their code, doesn't mean that it is legal to take it as if you are granted permission. You may get into a lot of trouble for this.
How can you Hack something then open source it? thats intelectual property, if you didn't write it you dont have the right to open source it, am I right? can someone explain if this is legal, what if someone decides to use one of this filters on an app?
It's only 'open sourced' in the title of the HN submission. From the README:
License
Since it's a hack, literally. There's no way you could use those
Instagram recipes in your project. But feel free to learn from
them. Other than that part, you are welcome to use and distribute
this project. I'll figour out an appropriate license and put it
here later.
That's ... not open source. I think information wants to be free, too, but this is unethical and is not what open source is about. You can't share somebody else's knowledge - just your own.
If you don't want to be considered a troll, then don't make these pithy comments.
1) The parent post did not use the word 'steal.'
2) The people that get up in arms about usage of 'steal' vs. 'copyright infringement' are making a semantic argument that is not really hard to understand. Whether you think that the semantic argument has merit or not is beside the point.
Your post makes it seem like you either do not understand the semantic argument (which I personally find unlikely, but I'll give the benefit of the doubt) or you are purposely acting like you don't understand it.
It's still their IP though, and publishing them as "open source" is unethical and probably illegal. Just because something is feasible doesn't mean you should do it.
The GPUImage-based execution environment is fine, but you should remove these shaders ASAP.