yum-mirror/slang
Making it easier to work with shaders
git clone https://git.yummers.dev/yum-mirror/slang
528ca0d0e
master
1//TEST:SIMPLE(filecheck=CHECK):-target hlsl -stage vertex -entry main 2 3[Flags] 4public enum VertexLayout : uint { 5 position, 6 color, 7 uv 8} 9 10struct VertexInput { 11 float3 position : POSITION_ATTR; 12 uint color : COLOR_ATTR; 13 float2 uv : UV_ATTR; 14}; 15 16public struct VertexOutput { 17 float4 position : SV_Position; 18 VertexLayout layout : TEXCOORD0; 19} 20 21[shader("vertex")] 22VertexOutput main(in VertexInput input) { 23 VertexOutput output; 24 output.position = float4(0); 25 output.layout = VertexLayout.position; 26 return output; 27} 28 29//CHECK: layout_0 : TEXCOORD0