yum-mirror/slang
Making it easier to work with shaders
git clone https://git.yummers.dev/yum-mirror/slang
8086adc90
master
1//TEST:SIMPLE(filecheck=METAL): -target metal 2//TEST:SIMPLE(filecheck=METALLIB): -target metallib 3 4// METAL: discard_fragment(); 5 6// METALLIB: define {{.*}} @main_fragment1 7 8struct VOut 9{ 10 float4 position : SV_Position; 11 float4 vertexColor; 12 float2 vertexUV; 13 float3 vertexNormal : NORMAL; 14} 15 16[shader("fragment")] 17float4 main_fragment1(VOut fragmentIn) 18{ 19 if (fragmentIn.vertexColor.x == 0.0) 20 discard; 21 return fragmentIn.vertexColor; 22}