Integrate HLSL compiler in Visual Studio

Source: Internet
Author: User
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.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.