0

I am getting the above error from my shader. Hull shader code snippet:

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;
}

And a snippet from my domain shader where the error is coming from:

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

Any help would be appreciated.

AdamW95
  • 51
  • 1
  • 5

2 Answers2

0

The clue is in the error!

ds_5_0 is the Domain Shader profile. Compile your Hull Shader with hs_5_0.

Adam Miles
  • 3,504
  • 17
  • 15
0

Managed to fix it by changing input patch to receive 4 rather than 3.

Thanks

AdamW95
  • 51
  • 1
  • 5