How To Do An Own Adobe Plugin

I would like to write an Adobe compatible filter which gets some image data from a paint program, does some effects using OGL and puts the rendered image back into the paint program. My problem is, I don’t find a SDK or any other documentation on how to write an Adobe compatible plugin (for PaintShop Pro, Photoshop etc…). There are thousands of filters but no sourcecode at all. (Because of the very large number of those filters it can’t be difficult.)
Does ANYBODY know a link to a tutorial or a SDK concerning Adobe compatible plugins? Any help would be greatly appreciated.