Quote: "1-i wrote a simple shader in a .fx file, it didnt work in my game, copied code to a .txt file and it worked fine, what is the difference?"
There shouldn't be one.
Quote: "2-vertex/pixel shaders can move and color object's vertices, right? how is that? or generally, how do a shader modify an object's behavior? like, an object has 300 vertices, and you want to give each one a dirfferent color, how to do it? if it's possible.."
A shader is just a function that takes various inputs and generates various outputs, a vertex shader will output a vertex position from an input position(optional) as well as other things such a the vertex colour, UV data etc, this is then sent to the pixel shader.
The pixel shader then takes various inputs and generates an output such as colour and z-depth, the pixel shader itself doesn't move anything and merely serves to handle the output for a single pixel which is found after the vertex shader is run.
As such, to give each vertex a different colour, you need to make sure the input is different for each vertex. This can be the position, the UV, the normals, whatever, you can alter this using the Vertex Data function set, or using memblocks.
Quote: "why did we multiply the WVP by the position of the input?"
You didn't, you multiplied the input position by the WVP, the 'mul' function multiplies two
matrices together, in this instance the other matrix is vertically 1D, so it's multiplying a matrix by a vector. The WVP matrix transforms things into World-View-Projection space, the World matrix is your object's scale, rotation and position, the View matrix is the camera's rotation and position, the Projection matrix is the camera's view shape, like the fov and near/far clipping distances. Together they can transform vertices into the camera view, but there are probably loads of articles out there that go far more in-depth about this.
Quote: "what is the position of the input anyway?"
That's the raw vertex position and won't change if you move your object, because movement is stored in the World matrix as mentioned above.
Quote: "position of a vertex? which one?"
Any, the function is called for every vertex in the object you apply the shader too.
Also:
'VertexShader = compile vs_1_1 VS();' 'PixelShader = compile ps_1_1 PS();', GDK uses a newer version of DirectX than DBPro, one that only supports shader model 2.0 and up, so you must specify vs_2_0 and ps_2_0 as minimum for it to work in GDK.
Plus your pixel shader takes the wrong input:
'float4 PS ( VS_INPUT input ) : COLOR0', I assume you meant to write VS_OUTPUT, but in this shader it won't matter because the members are the same.