blob: 1aa899e277638f0d6f6ea67c4b7132d447a441fb (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
|
struct DSOutput
{
float4 f4Position : SV_Position;
float3 f3Color : COLOR;
};
struct HS_CONSTANT_DATA_OUTPUT
{
float Edges[3] : SV_TessFactor;
float Inside : SV_InsideTessFactor;
};
struct HSOutput
{
float4 Position : POS;
float3 Color : COL;
};
[domain("tri")]
/* partitioning = fractional_odd ,
outputtopology = triangle_cw */
void main( HS_CONSTANT_DATA_OUTPUT Input,
float3 QuadUV : SV_DomainLocation,
OutputPatch<HSOutput, 1> QuadPatch,
out DSOutput Out)
{
Out.f4Position.xy = QuadPatch[0].Position.xy + QuadUV.x * float2(-0.15, 0.0) + QuadUV.y * float2(0.0, 0.15) + QuadUV.z * float2(+0.15, 0.0);
Out.f4Position.zw = QuadPatch[0].Position.zw;
Out.f3Color = frac( (QuadPatch[0].Color + QuadUV.xyz * float3(4121.35f, 8232.25f, 9124.42f) ) );
}
|