summaryrefslogtreecommitdiffstats
path: root/tests/metal/barycentrics.slang
blob: 19c41388842b3b8690f9fd0c5173a7802ac95486 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
//TEST:SIMPLE(filecheck=METAL): -target metal
//TEST:SIMPLE(filecheck=METALLIB): -target metallib

// METAL:    {{\[\[}}barycentric_coord{{\]\]}}
// METALLIB: !"air.barycentric_coord"

[shader("fragment")]
float4 fragment_main(float4 pos: SV_Position, float3 barycentrics: SV_Barycentrics)
    : SV_Target
{
    return float4(barycentrics, 1.f);
}