rhpassthrough.geom 355 B

123456789101112131415161718192021
  1. layout(triangles) in;
  2. layout(triangle_strip, max_vertices=3) out;
  3. in int layer[3];
  4. in vec2 uv_in[3];
  5. flat out int slice;
  6. out vec2 uv;
  7. void main(void)
  8. {
  9. gl_Layer = layer[0];
  10. for(int i=0; i<3; i++)
  11. {
  12. slice = layer[0];
  13. uv = uv_in[i];
  14. gl_Position = gl_in[i].gl_Position;
  15. EmitVertex();
  16. }
  17. EndPrimitive();
  18. }