Welcome to mirror list, hosted at ThFree Co, Russian Federation.

transform-feedback-streams.geom « geom « shaders « opt « reference - github.com/KhronosGroup/SPIRV-Cross.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 4d238b4adff9d7eac9817965b63d4377984c6ccf (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
#version 450
layout(points) in;
layout(max_vertices = 2, points) out;

layout(xfb_buffer = 1, xfb_stride = 20, stream = 1) out gl_PerVertex
{
    layout(xfb_offset = 4) vec4 gl_Position;
    float gl_PointSize;
};

layout(location = 0, xfb_buffer = 2, xfb_stride = 32, xfb_offset = 16, stream = 1) out vec4 vFoo;
layout(xfb_buffer = 3, xfb_stride = 16, stream = 2) out VertOut
{
    layout(location = 1, xfb_offset = 0) vec4 vBar;
} _23;


void main()
{
    gl_Position = vec4(1.0);
    vFoo = vec4(3.0);
    EmitStreamVertex(1);
    _23.vBar = vec4(5.0);
    EmitStreamVertex(2);
}