gl_Positionshould be written only by the final Vertex Processing step (VS, tessellation and GS) in the rendering pipeline. Therefore, if you have an active GS, VS that connects to it, you do not need to write to gl_Position. Or it can put any arbitrary vec4data into it .
Note that gl_Positionyou still need to write regardless of the processing stage of the final vertex. Assuming you want to rasterize, of course. And no, this is not frivolous; You can do feedback.
If not, this means that I can simply use it as an additional slot for data transfer without any special spatial interpretation between stages, right?
GS, " ". gl_Position .
- , . , GLSL 4.30+ , , . .