Pixel Bender, what is its "language"

Hi all,

I have been looking at google for Pixel Bender tutorials but i have yet to hit a fundamental understanding.

Most of the filters i see, or tutorials i read seem to create some effect with very few lines of code. More importantly i seem to constantly see a bunch of maths like squre root, sin, cos, and so on. Here is a random section of code:


[COLOR=#FF0000]pixel1 temp = sample(src,outCoord()); [/COLOR]
[COLOR=#FF0000]pixel1 divided = temp/2.0;[/COLOR]
[COLOR=#FF0000]pixel1 squared = sqrt(temp);[/COLOR]
[COLOR=#FF0000]dst = pixel3(temp,divided,squared);[/COLOR]

This means almost nothing to me, but there has to be a method behind the madness. What is pixel benders syntax? Is it a custom language or is it some kind of generic (limited-in-flash-runtime) shading language?

The first thing i did was go onto Amazon and check out “Image Processing Algothirms” but wasnt sure what i was looking for. That seemed a bit hardcore anyway and seemed to be aimed at C. However am i on the right track?

Also as a side note, when i first opened PB, i was reminded of Processing. Both seem to exist for visual purposes or fast number crunching so if i read a book on processing, am i likely to take much from it in terms of “understanding the pixel”.

Cheers.