yum-mirror/slang

Making it easier to work with shaders

git clone https://git.yummers.dev/yum-mirror/slang

Yong HeOverhaul global inst deduplication and cpp/cuda backend. (#2654)4c4826d47

master
951 B38 linesraw
1#pragma pack_matrix(column_major)
2#ifdef SLANG_HLSL_ENABLE_NVAPI
3#include "nvHLSLExtns.h"
4#endif
5#pragma warning(disable: 3557)
6
7static const float2  positions_0[int(3)] = { float2(0.0, -0.5), float2(0.5, 0.5), float2(-0.5, 0.5) };
8static const float3  colors_0[int(3)] = { float3(1.0, 1.0, 0.0), float3(0.0, 1.0, 1.0), float3(1.0, 0.0, 1.0) };
9struct Vertex_0
10{
11    float4 pos_0 : SV_Position;
12    float3 color_0 : Color;
13};
14
15[shader("mesh")][numthreads(3, 1, 1)]
16[outputtopology("triangle")]
17void main(uint tig_0 : SV_GROUPINDEX, vertices vertices out Vertex_0  verts_0[int(3)], indices indices out uint3  triangles_0[int(1)])
18{
19    SetMeshOutputCounts(3U, 1U);
20    if(tig_0 < 3U)
21    {
22        verts_0[tig_0].pos_0 = float4(positions_0[tig_0], 0.0, 1.0);
23        verts_0[tig_0].color_0 = colors_0[tig_0];
24    }
25    else
26    {
27    }
28
29    if(tig_0 < 1U)
30    {
31        triangles_0[tig_0] = uint3(0U, 1U, 2U);
32    }
33    else
34    {
35    }
36
37    return;
38}