该文档: http : //msdn.microsoft.com/en-us/library/dd607349(v=vs.85).aspx
指出#include“foobar.fx”将在与当前效果文件相同的目录中查找该文件。
它不起作用,但使用绝对路径,这当然是无用的。
谷歌没有任何东西。 我在这里错过的任何东西?
The document: http://msdn.microsoft.com/en-us/library/dd607349(v=vs.85).aspx
states that #include "foobar.fx" will look for that file in the same directory as the current effect file.
It doesn't work, but using an absolute path does, which is of course useless.
Google doesn't come up with anything. Anything I'm missing here?
最满意答案
该自动处理仅适用于离线着色器编译器工具,如您提供的链接中所述。 如果使用其中一个API进行编译,则需要指定编译器在包含指令时使用的包含处理程序: ID3DInclude
That automatic handling only works for the offline shader compiler tool, as mentioned in the link you provided. If you're compiling using one of the APIs, you'll need to specify an include handler for the compiler to use whenever it encounters an include directive: ID3DInclude
更多推荐
发布评论