yum-mirror/glslang
git clone https://git.yummers.dev/yum-mirror/glslang
e00d27c6
16.6.0
1// Test tesselation factor output as PCF arg 2 3struct VSOutput 4{ 5float4 f4Position : SV_Position ; 6float3 f3Color : COLOR ; 7} ; 8 9struct HS_CONSTANT_DATA_OUTPUT 10{ 11float Edges [ 4 ] : SV_TessFactor ; 12} ; 13 14HS_CONSTANT_DATA_OUTPUT ConstantHS ( InputPatch < VSOutput , 1 > p , 15uint BlockID : SV_PrimitiveID , 16out float Inside [ 2 ] : SV_InsideTessFactor ) 17{ 18HS_CONSTANT_DATA_OUTPUT Factors ; 19Factors . Edges [ 0 ] = 2.5 ; 20Factors . Edges [ 1 ] = 4.25 ; 21Factors . Edges [ 2 ] = 5.75 ; 22Factors . Edges [ 3 ] = 7.5 ; 23 24Inside [ 0 ] = 6.75 ; 25Inside [ 1 ] = 7.25 ; 26 27return Factors ; 28} 29 30struct HSOutput 31{ 32float4 Position : POS ; 33float3 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{ 43HSOutput Out ; 44Out . Position = inputPatch [ uCPID ] . f4Position ; 45Out . Color = inputPatch [ uCPID ] . f3Color ; 46return Out ; 47} 48