1// Test tesselation factor output as PCF arg 2 3struct VSOutput 4{ 5 float4 f4Position : SV_Position; 6 float3 f3Color : COLOR; 7}; 8 9struct HS_CONSTANT_DATA_OUTPUT 10{ 11 float Edges[4] : SV_TessFactor; 12}; 13 14HS_CONSTANT_DATA_OUTPUT ConstantHS(InputPatch<VSOutput, 1> p, 15 uint BlockID : SV_PrimitiveID, 16 out float Inside[2] : SV_InsideTessFactor) 17{ 18 HS_CONSTANT_DATA_OUTPUT Factors; 19 Factors.Edges[0] = 2.5; 20 Factors.Edges[1] = 4.25; 21 Factors.Edges[2] = 5.75; 22 Factors.Edges[3] = 7.5; 23 24 Inside[0] = 6.75; 25 Inside[1] = 7.25; 26 27 return Factors; 28} 29 30struct HSOutput 31{ 32 float4 Position : POS; 33 float3 Color : COL; 34}; 35 36[domain("quad")] 37[partitioning("fractional_even")] 38[outputtopology("triangle_ccw")] 39[outputcontrolpoints(1)] 40[patchconstantfunc("ConstantHS")] 41HSOutput main(InputPatch<VSOutput, 1> inputPatch, uint uCPID : SV_OutputControlPointID) 42{ 43 HSOutput Out; 44 Out.Position = inputPatch[uCPID].f4Position; 45 Out.Color = inputPatch[uCPID].f3Color; 46 return Out; 47} 48 49