How do shaders work?

[ Moderator note: topic was split off from this as a separate topic ]

Would you mind explaining how the shaders work?

Actually, i have no idea. I think of them like an extra layer over all the others (background, hulks, ships are in separated layers), that works like a filter. If it is configured to have more bright, the beams and the shields will glow more, if it is configured to distort X and Y axis, you get visual weirdness…

Sadly i dont know anything about their coding, values and variables; they are very complex for me -.-’

I would like to change the vertical distorting grid for a diagonal one. Help?

Found an old post here that sheds some major light on the nature of GSB’s shaders, and an awesome link to a shader tutorial.

Yep, from there i took the distortion shader, wich i love, thanks dantalion ^^

But i wanted to know what means each part of a shader, how to code it and learn about it, in a easy way (beacuase to the hell with “yeah… Don’t be lazy!” xD)

Did you bother to read the shader tutorial webpage which Cliffski provided to you in the link I posted above???

It sounds like you didn’t, because that article has a lot of the very same data that you’re looking for. I could hardly care about shaders one way or the other, but I still found that webpage to be very helpful as well as interesting. It’s written in an easy-to-understand style.

I can’t believe that i didn’t saw it, lol. Reading…

sooo… i’'ve been trying to get how shaders works, found that there are many shader classes, the important ones to me are Displacement and Bump Shaders. Displacement shaders changes the coordinates of a pixel to another place according to a variable, it repeats the same procces with all the pixels that you determinated. Bump shaders are similar to the last ones, but they can also affect the light (as example, displacement shaders distort an determinated area of space, bump shaders distort everyithing that passes throught that area, or something like that)

But i just cannot get too many things, and i have too many questions and too less time… therefore i’m going to ask:

There is some shader coder in this forum? If yes, can i make a small request for a shader?

This is what i want to get:


Halp?