evanw / glfx.js

An image effects library for JavaScript using WebGL
https://evanw.github.io/glfx.js/
MIT License
3.28k stars 403 forks source link

need image composition effects #1

Open evanw opened 13 years ago

evanw commented 13 years ago

Image composition effects would be awesome (effects combining multiple images). Ideas:

gdotdesign commented 12 years ago

I found these on blending modes:

http://mouaif.wordpress.com/2009/01/05/photoshop-math-with-glsl-shaders/ http://en.wikipedia.org/wiki/Blend_modes http://stackoverflow.com/questions/5919663/how-does-photoshop-blend-two-images-together

The first one should be ported without problems i think.

maz commented 12 years ago

All these composite operations are currently implemented in the 2D canvas. It might make more sense to use that instead of writing new code.

mudcube commented 11 years ago

Might be of interesting, a few blend modes in WebGL, release under a modified MIT license:

http://devmaster.net/posts/3040/shader-effects-blend-modes

PAEz commented 10 years ago

I played with those glsl blend modes over the last couple of days when I didnt have net and wanted to look at this for procedural texture generation which really needs blend modes... https://gist.github.com/PAEz/c4a2f2f5f0f7f627eb1a http://jsbin.com/zizolabasice/1/edit ...Have fun with the jsbin test ;) I had to create a filter for every blend mode as trying to use an if/else block kept running out of memory. I really know jack all about gl so Im sure this could be better. One thing Id love some help with is did I get the alpha stuff right?....looks right ;) Now Im back on the net Ill be looking in to all this more.