Binary that renders a triangle using Vulkan, scans the resulting image to a PNG, and makes an occlusion query to determine the number of fragments shaded. To be used in developing Turnip.
您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

occlusion.vert 532B

1234567891011121314151617181920212223242526
  1. #version 450
  2. layout(location = 0) out vec3 fragColor;
  3. vec3 positions[6] = vec3[](
  4. vec3(0.5, -0.5, 0.0),
  5. vec3(0.5, 0.5, 0.0),
  6. vec3(-0.5, 0.5, 0.0),
  7. vec3(-0.5, -0.5, 0.1),
  8. vec3(0.5, 0.5, 0.1),
  9. vec3(-0.5, 0.5, 0.1)
  10. );
  11. vec3 colors[6] = vec3[](
  12. vec3(1.0, 0.0, 0.0),
  13. vec3(1.0, 0.0, 0.0),
  14. vec3(1.0, 0.0, 0.0),
  15. vec3(0.0, 1.0, 0.0),
  16. vec3(0.0, 1.0, 0.0),
  17. vec3(0.0, 1.0, 0.0)
  18. );
  19. void main() {
  20. gl_Position = vec4(positions[gl_VertexIndex], 1.0);
  21. fragColor = colors[gl_VertexIndex];
  22. }