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