No Description

scene.tesc 915B

123456789101112131415161718192021222324252627282930
  1. #version 450
  2. layout (vertices = 3) out;
  3. layout (location = 0) in vec3 inNormal[];
  4. layout (location = 1) in vec3 inColor[];
  5. layout (location = 2) in vec3 inViewVec[];
  6. layout (location = 3) in vec3 inLightVec[];
  7. layout (location = 0) out vec3 outNormal[3];
  8. layout (location = 1) out vec3 outColor[3];
  9. layout (location = 2) out vec3 outViewVec[3];
  10. layout (location = 3) out vec3 outLightVec[3];
  11. void main(void)
  12. {
  13. if (gl_InvocationID == 0)
  14. {
  15. gl_TessLevelInner[0] = 2.0;
  16. gl_TessLevelOuter[0] = 1.0;
  17. gl_TessLevelOuter[1] = 1.0;
  18. gl_TessLevelOuter[2] = 1.0;
  19. }
  20. gl_out[gl_InvocationID].gl_Position = gl_in[gl_InvocationID].gl_Position;
  21. outNormal[gl_InvocationID] = inNormal[gl_InvocationID];
  22. outColor[gl_InvocationID] = inColor[gl_InvocationID];
  23. outViewVec[gl_InvocationID] = inViewVec[gl_InvocationID];
  24. outLightVec[gl_InvocationID] = inLightVec[gl_InvocationID];
  25. }