我正在使用 DirectX 9 效果框架。
我想创建一个包含这样一个采样器的结构:
struct Test
{
texture tex;
sampler texSamp = sampler_state
{
Texture = <tex>;
};
};
然而,着色器编译器失败:
internal error: this-relative Test::tex 'tex' found outsideof function scope
似乎 this-relative 引用的想法是可行的,但我需要以某种方式在函数中声明它,但我不确定它是如何工作的,因为在函数内部声明采样器不起作用?有人有想法么?