130.vert 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  1. #version 130
  2. uniform int c;
  3. uniform usampler2D us2D;
  4. in ivec2 x;
  5. in vec2 v2a;
  6. in float c1D;
  7. in vec2 c2D;
  8. in vec3 c3D;
  9. smooth vec4 c4D; // ??
  10. uniform vec4 v4;
  11. void main()
  12. {
  13. float f = 3;
  14. switch (c) { // full switch testing in switch.frag
  15. case 1:
  16. f = sin(f);
  17. break;
  18. case 2:
  19. f = f * f;
  20. default:
  21. f = 3.0;
  22. }
  23. uint i;
  24. i = texture(us2D, x).w; // full uint testing in uint.frag
  25. i << 3u | 0x8Au >> 1u & 0xFFu;
  26. vec3 modfOut, modfIn;
  27. vec3 v11 = modf(modfIn, modfOut);
  28. float t = trunc(f);
  29. vec2 v12 = round(v2a);
  30. vec2 v13 = roundEven(v2a);
  31. bvec2 b10 = isnan(v2a);
  32. bvec4 b11 = isinf(v4);
  33. sinh(c1D) +
  34. cosh(c1D) * tanh(c2D);
  35. asinh(c4D) + acosh(c4D);
  36. atanh(c3D);
  37. int id = gl_VertexID;
  38. gl_ClipDistance[1] = 0.3;
  39. }
  40. // version 140 features
  41. //uniform isamplerBuffer sbuf;
  42. //layout(std140) uniform blockName {
  43. // int anonMem;
  44. //};
  45. void foo88()
  46. {
  47. int id = gl_InstanceID; // ERROR
  48. //id += anonMem;
  49. id += texelFetch(id, 8);
  50. gl_ClipVertex; // these are all present...
  51. gl_Color;
  52. gl_LightSource[0];
  53. gl_DepthRange.far;
  54. gl_TexCoord;
  55. gl_FogFragCoord;
  56. gl_FrontColor;
  57. }
  58. // token pasting
  59. #define mac abc##def
  60. int mac;
  61. #define macr(A,B) A##B
  62. int macr(qrs,tuv);