Original Post
If anyone has done any work using Texture Shaders outside of FX files, I'm running into problems when trying to fill a Volume texture using D3DXFillVolumeTextureTX. I'm trying to compile the texture shader using D3DXCompileShaderFromFile. Then I call D3DXCrateTextureShader passing in the DWORD* buffer pointer from the compile function. I then set appropriate constants in the constant table and call D3DXFillVolumeTextureTX passing in my volume texture and the created Texture Shader. However, I'm running into issues. The main one is that I can't decide which shader profile to pass into the compiler. The MSDN says that the texture shader function should declare POSITION and PSIZE semantics, and return a COLOR semantic. Obviously these are illegal input semantics for a Pixel Shader, and compile fails. However, Vertex Shaders also need to write a POSITION output, so without hacking that in compile also fails for a Vertex Shader profile. Using the HLSL function defined in the MSDN under D3DXFillTextureTX won't compile under vertex or pixel shader profiles (just placed in a text file and compiled), and I assume this is because I'm trying to do it without Effects files. Anyone have any idea what I can do?