yum-mirror/slang
Making it easier to work with shaders
git clone https://git.yummers.dev/yum-mirror/slang
c43f6fa55
master
1//TEST:SIMPLE(filecheck=CHECK_HLSL): -target hlsl -stage fragment -entry main 2//TEST:SIMPLE(filecheck=CHECK_SPV): -target spirv -emit-spirv-directly -stage fragment -entry main 3 4struct VertexOut 5{ 6 float4 pos : SV_Position; 7 float3 color; 8} 9 10// CHECK_SPV: %v_color = OpVariable %_ptr_Input_v3float Input 11// CHECK_SPV: %{{.*}} = OpExtInst %v3float %{{.*}} InterpolateAtCentroid %v_color 12// CHECK_HLSL: EvaluateAttributeAtCentroid(v_0.color_0) 13 14float4 main(VertexOut v) : SV_Target 15{ 16 return float4(EvaluateAttributeAtCentroid(v.color), 1.0); 17}