[SOLVED] VertexDeclaration / VertexElementFormat and VertexShaderInput datatypes

What happens if in a VertexDeclaration a VertexElement has for example the VertexElementFormat Vector3 and for the VertexShader function this VertexElement is expected as e.g. float4?

Is it initialized with a default value?

Does it use data from another (adjacent in memory) VertexElement for the fourth component?

I guess it is handled like this:

if the vertex buffer datatype is smaller than the one in the vertex shader, the values are initialized with 0 except the last component, which defaults to 1.

So e.g. you have a float2 UV in the vertex buffer and you setup a vertex shader expecting a float4 UV, the UV variable in the vertex shader will have the values from the vertex buffer in the first two components, the third component is 0 and the fourth 1.

UV = float4(UV_VB, 0, 1)