yum-mirror/slang

Making it easier to work with shaders

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

Tim FoleyAdd support for RWBuffer writes on GLSL/SPIR-V target (#1199)122126c00

master
416 B26 linesraw
1// rw-buffer.slang.glsl
2//TEST_IGNORE_FILE:
3
4#version 450
5layout(row_major) uniform;
6layout(row_major) buffer;
7
8layout(r32f)
9layout(binding = 0)
10uniform imageBuffer buffer_0;
11
12layout(location = 0)
13out vec4 _S1;
14
15layout(location = 0)
16in float _S2;
17
18flat layout(location = 1)
19in int _S3;
20
21void main()
22{
23	imageStore(buffer_0, int(uint(_S3)), vec4(_S2, float(0), float(0), float(0)));
24    _S1 = vec4(_S2);
25    return;
26}