在Visual Studio中集成HLSL编译器
来源:互联网 发布:日本和服的来源知乎 编辑:程序博客网 时间:2024/05/21 09:20
工具->外部工具->添加,标题可以随意设置,比如"HLSLCompiler"。命令为DXSDK所带的HLSL编译器fxc地址,比如“D:\Program Files\Microsoft DirectX SDK (February 2010)\Utilities\bin\x86\fxc.exe”。在参数里输入$(ItemPath) /Od /Zi /T fx_2_0 /LD /Fo 后面的一串其实就是fxc.exe里的命令参数,在复选框选择“使用输出窗口”。如果需要设置pfofile,可以设置“提示输入参数”。
选择HLSL文件,然后选择工具>HLSLCompiler,即可编译HLSL文件,并在输出窗口输出编译结果。
注意:HLSL文件不允许在中文目录中,否则会出现如下结果:
Microsoft (R) Direct3D Shader Compiler 9.27.952.3012
Copyright (C) Microsoft Corporation 2002-2009. All rights reserved.
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
另外发现使用D3DXCreateEffectFromFile或者D3DXCreateEffectFromResource编译绝对目录含中文的着色效果文件时,可以正确编译,但编译后的程序却无法正常运行。这个破问题,困扰了我好几天,Debug到那,连个返回错误代码都没有,汗,就是运行出错。我使用的是DirectX9,不知道 DirectX10如何。
- 在Visual Studio中集成HLSL编译器
- 在VS2008中集成HLSL编译器
- 在VS2008中集成HLSL编译器
- 在Visual Studio 2005/2008中使用HLSL语法加亮功能
- Matlab 2011集成Visual studio 2010编译器
- 在Visual Studio中使用任何C++编译器
- visual studio 中显示cg,hlsl语法高亮
- 在 Microsoft Visual Studio .NET 中集成 Openwave 模拟器
- 在 Microsoft Visual Studio .NET 中集成 openwave 模拟器
- 在 Microsoft Visual Studio .NET 中集成 Openwave 模拟器
- 在 Microsoft Visual Studio .NET 中集成 Openwave 模拟器
- 在Visual Studio 2008中集成Lua解释器
- cpplint 集成到visual studio中
- 在Visual Studio中集成使用 Qt Opensource 版本 ||| 在 QtCreator 使用 VC 编译调试
- 在Visual Studio中集成使用 Qt Opensource 版本 ||| 在 QtCreator 使用 VC 编译调试
- 在Visual Studio 6.0集成环境中开发设备驱动程序的方法
- 在Visual Studio 6.0集成环境中开发设备驱动程序的方法
- 在Visual Studio项目模板中集成NX二次开发项目模板
- Windows 8不得不说的13个特色功能
- 分析称ARM架构将在2013年具备挑战X86资格
- 页脚固定页面底部
- error C2780: “void std::sort(_RanIt,_RanIt,_Pr)”: 应输入 3 个参数,却提供了 2 个
- 将matlab的GUI转换成可执行文件exe
- 在Visual Studio中集成HLSL编译器
- 日本五大电子巨企沦陷:无法适应移动互联网年代
- 3D分析之Functional Surface工具箱
- “双十一”背后的隐形战场:电商后台IT技术大检阅
- poj 3497 or hdu 2333
- 开发者告诉你为什么Android是最好的开发平台
- APT攻击与检测系统
- 两款高速4TB硬盘巅峰对决 直击SSD短板
- HTML 5被媒体炒作