This is a pretty basic question, but the HLSL documentation and guides out there are pretty scarce and disappointing...
I've learned that vertex and pixel shaders are executed by the graphics pipeline during the vertex and pixel shader stages, respectively. But I've seen projects that use multiple vertex/pixel shader functions, like:
// Vertex shader
float4 DoSomeTransformationVS(float4 v : POSITION) : SV_POSITION
{
...
}
// Also vertex shader
float4 DoAnotherTransformationVS(float4 v : POSITION) : SV_POSITION
{
...
}
What happens then? Are both functions executed during VS stage? In fact, how does the compiler know which functions are vertex shaders and which are pixel shaders?