-
Couldn't load subscription status.
- Fork 616
Open
Description
The current vertex.flip_vert_y implementation adds gl_Position.y flipping at SPIRBlock::Return.
Lines 17911 to 17917 in 72b5b7c
| case SPIRBlock::Return: | |
| { | |
| for (auto &line : current_function->fixup_hooks_out) | |
| line(); | |
| if (processing_entry_point) | |
| emit_fixup(); |
However, this does not affect the EmitVertex calls, so the vertices emitted in geometry shaders remain unflipped, which appears to be unintended.
Relevant issue: #1469
Small thoughts:
- Basically we could flip Y just before every
EmitVertexcall to resolve this issue. However, the code may usegl_Positionafter theEmitVertexcall (I won't write such a code though), so the modification should be rolled back immediately to maintain the original behavior. - For VS-GS or VS-TCS-TES (or similar) pipelines, we can refer to the
gl_Positionoutput from the previous stage. So it might be necessary to flip the input initially. However, if the geometry shader is used in isolation, flipping the input is not necessary...- It might be useful to add an option to specify how the input should be handled...
Metadata
Metadata
Assignees
Labels
No labels