G'day,
1:
A typical shader includes a whole bunch of variables and functions, and these can generally be named however the user wants (unless of course it's something the engine automatically provides such as many matrices).
What actually determines which of these functions are used for each shader, and what shader model is used, is the technique:
technique ArbitraryMeaninglessNameThatNeverGetsReferencedAnyway {
pass AnotherMeaninglessName {
// set some states, then:
VertexShader = compile vs_2_0 VS();
PixelShader = compile ps_2_0 PS();
}
}
Now, the technique names can have meaning -- these (such as "lod1...lod3" or "_lm1..._lm3") are mentioned in the manual.
The engine will use the first technique it finds that's compatible with the user's hardware.
Eg:
technique Chicken {
pass Legs {
VertexShader = compile vs_3_0 myVertexShader3Function();
PixelShader = compile ps_3_0 myPixelShader3Function();
}
}
technique nickel {
pass tongue {
VertexShader = compile vs_2_0 aCompatibleFunction();
PixelShader = compile ps_2_0 anotherOne();
}
}
If the hardware supports shader model 3.0 or higher, the "Chicken" technique will automatically be used. Otherwise, the "nickel" technique will be used -- assuming the user's hardware supports shader model 2.0.
I know I spent a lot of time on this one, but I'm just not sure how much you know and how much you don't
2: There's no reason they need to be. Except for accepting model data into the vertex shader, how the TEXCOORDs are used is completely up to the shader writer.
Jibb