Debian Codegraph @

tests/auto/buildtimeqsb/tess_hull.hlsl

raw
1 struct Input
2 {
3 float3 color : TEXCOORD0;
4 float4 position : SV_Position;
5 };
6
7 struct Output
8 {
9 float3 position : POSITION;
10 float3 color : COLOR;
11 };
12
13 struct ConstantData
14 {
15 float edges[3] : SV_TessFactor;
16 float inside : SV_InsideTessFactor;
17 };
18
19 ConstantData patchConstFunc(InputPatch<Input, 3> ip, uint PatchID : SV_PrimitiveID )
20 {
21 ConstantData d;
22 d.edges[0] = 4.0;
23 d.edges[1] = 4.0;
24 d.edges[2] = 4.0;
25 d.inside = 4.0;
26 return d;
27 }
28
29 [domain("tri")]
30 [partitioning("integer")]
31 [outputtopology("triangle_cw")]
32 [outputcontrolpoints(3)]
33 [patchconstantfunc("patchConstFunc")]
34 Output main(InputPatch<Input, 3> patch, uint pointId : SV_OutputControlPointID, uint patchId : SV_PrimitiveID)
35 {
36 Output output;
37 output.position = patch[pointId].position;
38 output.color = patch[pointId].color;
39 return output;
40 }