hlsl.basic.geom 608 B

1234567891011121314151617181920212223242526
  1. struct PSInput
  2. {
  3. float myfloat : SOME_SEMANTIC;
  4. int something : ANOTHER_SEMANTIC;
  5. };
  6. struct nametest {
  7. int Append; // these are valid names even though they are also method names.
  8. int RestartStrip; // ...
  9. };
  10. [maxvertexcount(4)]
  11. void main(triangle in uint VertexID[3] : VertexID,
  12. triangle uint test[3] : FOO,
  13. inout LineStream<PSInput> OutputStream)
  14. {
  15. PSInput Vert;
  16. Vert.myfloat = test[0] + test[1] + test[2];
  17. Vert.something = VertexID[0];
  18. OutputStream.Append(Vert);
  19. OutputStream.Append(Vert);
  20. OutputStream.RestartStrip();
  21. }