GPU/Shader Instruction Set: Difference between revisions
No edit summary |
No edit summary |
||
Line 480: | Line 480: | ||
| 0 (no param) | | 0 (no param) | ||
| EMIT | | EMIT | ||
| (geometry shader only) Emits a vertex (and primitive if | | (geometry shader only) Emits a vertex (and primitive if FLAG_PRIMEMIT was set in the corresponding SETEMIT). SETEMIT must be called before this. | ||
|- | |- | ||
| 0x2B | | 0x2B | ||
| 4 | | 4 | ||
| SETEMIT | | SETEMIT | ||
| (geometry shader only) Sets VTXID and | | (geometry shader only) Sets VTXID, FLAG_WINDING and FLAG_PRIMEMIT for the next EMIT instruction. VTXID is the ID of the vertex about to be emitted within the primitive, while FLAG_PRIMEMIT is zero if we are just emitting a single vertex and non-zero if are emitting a vertex and primitive simultaneously. FLAG_WINDING controls the output primitive's winding. Note that the output vertex buffer (which holds 4 vertices) is '''not''' cleared when the primitive is emitted, meaning that vertices from the previous primitive can be reused for the current one. (this is still a working hypothesis and unconfirmed) | ||
|- | |- | ||
| 0x2C | | 0x2C |