#version 450 // iter16 winding probe vertex shader. // Captures gl_VertexIndex as a single uint32 per VS invocation. // With non-LIST topologies + XFB, the spec requires the captured buffer // to be primitive-decomposed — i.e., MORE outputs than input vertices. // iter13 fails this: it captures one entry per VS invocation (= one per // input vertex). iter16 must inject driver-side decomposition so the // captured stream matches the decomposed primitive sequence. layout(xfb_buffer = 0, xfb_offset = 0, xfb_stride = 4, location = 0) out uint captured; void main() { gl_Position = vec4(0, 0, 0, 1); captured = uint(gl_VertexIndex); }