Tools> external tools> Add, titles can be set at will, such as "hlslcompiler ". The command is the fxc address of the HLSL compiler in dxsdk, for example, "d: \ Program Files \ Microsoft DirectX SDK (February 2010) \ utilities \ bin \ x86 \ fxc.exe ". Enter $ (itempath) in the Parameter)
After/OD/Zi/T fx_2_0/LD/Fo, select "use output window" in the check box as a string of command parameters in fxc.exe ". If you need to set pfofile, you can set "prompt input parameter ". Select the HLSL file and select Tools> hlslcompiler to compile the HLSL file and output the compilation result in the output window.
Note: HLSL files are not allowed in the Chinese directory; otherwise, the following result is displayed:
Microsoft (r) direct3d shader compiler 9.27.952.3012
Copyright (c) Microsoft Corporation 2002-2009. All rights reserved.
An error occurred while setting the initial search directory.
Searches will be relative to the application's starting directory.
Compilation failed; no code produced
In addition, it is found that when you use d3dxcreateeffectfromfile or d3dxcreateeffectfromresource to compile a coloring effect file containing Chinese Characters in an absolute directory, the compiled program cannot run normally. This broken problem has plagued me for several days. When debug arrives, I don't even have a returned error code. Khan means an error occurs during running. I am using directx9 and don't know how directx10 works.