0

我从我的着色器中收到上述错误。船体着色器代码片段:

struct ConstantOutputType
{
    float edges[4] : SV_TessFactor;
    float inside[2] : SV_InsideTessFactor;
};

ConstantOutputType PatchConstantFunction(InputPatch<InputType, 3> inputPatch, uint patchId : SV_PrimitiveID)
{    
ConstantOutputType output;


output.edges[0] = 2;
output.edges[1] = 2;
output.edges[2] = 4;
output.edges[3] = 4;


output.inside[0] = 2;
output.inside[1] = 4;

return output;
}

以及来自我的域着色器的片段,错误来自:

struct ConstantOutputType
{
     float edges[3] : SV_TessFactor;
     float inside[2] : SV_InsideTessFactor;
};

任何帮助,将不胜感激。

4

2 回答 2

0

线索在错误中!

ds_5_0 是域着色器配置文件。使用 hs_5_0 编译您的船体着色器。

于 2015-12-10T08:09:02.163 回答
0

设法通过将输入补丁更改为接收 4 而不是 3 来修复它。

谢谢

于 2015-12-10T13:12:30.113 回答