summaryrefslogtreecommitdiffstats
path: root/HLSL2GLSLConverter/testshaders/TessTestDX.dsh
blob: 0534a1a8fe4da9170271e2e3ebe0ca8395846979 (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
struct DSOutput
{
	float4 f4Position : SV_Position;
};


struct HS_CONSTANT_DATA_OUTPUT
{
    float Edges[4]  : SV_TessFactor;
    float Inside[2] : SV_InsideTessFactor;
};

struct HSOutput
{
    float4 Position : POS;
    float3 Color : COL;
};

[domain("quad")]
   /* partitioning = fractional_even, outputtopology = triangle_cw */
float3 main( HS_CONSTANT_DATA_OUTPUT input, 
           float2 QuadUV : SV_DomainLocation, 
           OutputPatch<HSOutput, 2> QuadPatch,
           out DSOutput Out ): COLOR
{
    Out.f4Position.xy = QuadPatch[0].Position.xy + QuadUV.xy * 0.1;
    Out.f4Position.zw = QuadPatch[0].Position.zw;
    return frac( (QuadPatch[0].Color + float3(QuadUV.xy, 1.0)) * float3(4121.35f, 8232.25f, 9124.42f) );
}