You don't really 'load' an HLSL file, as much as you compile it into a 'shader blob'. You can either compile it at build time (which is recommended and easy to do if you are writing a C++ application using Visual Studio 2012), or you can compile it at
runtime using the D3DCompile APIs as long as you are talking about Win32 desktop apps or just a test Windows Store app/Windows phone app that you won't actually try to submit to the Store.
this blog entry
for some background on HLSL compilation. For some details about profiles and how they relate to Feature Levels, read
Once you have have the shader blob (from a binary disk file, returned from the D3DCompile API, or as a C++ header static array like we use for the BasicEfffect built-in shaderS), you create a Direct3D shader object from it. From there, it's a matter of binding
it at draw time. There is the additional complexity that your vertex shader is needed to create an input layout. I cover this 'advanced drawing' scenario in the
, but I assume you are using a DirectXTK Effect instance somewhere in all this (either a built-in one or a custom one).
You can try to do the same kind of 'custom state' override as that other thread shows easily enough as it's passed down through the Draw hierarchy and takes place after the 'effect' is applied. Again, the main issue is making sure your vertex shader object
matches the input layout for the mesh.