Advertisement
Guest User

Untitled

a guest
Nov 26th, 2015
83
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.06 KB | None | 0 0
  1. #version 330 core
  2.  
  3. layout (location = 0) out vec4 color;
  4.  
  5. in DATA
  6. {
  7. vec4 position;
  8. vec2 uv;
  9. vec4 color;
  10. flat float tex;
  11. } fs_in;
  12.  
  13. uniform sampler2D texture0;
  14. uniform sampler2D texture1;
  15. uniform sampler2D texture2;
  16. uniform sampler2D texture3;
  17. uniform sampler2D texture4;
  18. uniform sampler2D texture5;
  19. uniform sampler2D texture6;
  20. uniform sampler2D texture7;
  21. uniform sampler2D texture8;
  22. uniform sampler2D texture9;
  23. uniform sampler2D texture10;
  24. uniform sampler2D texture11;
  25. uniform sampler2D texture12;
  26. uniform sampler2D texture13;
  27. uniform sampler2D texture14;
  28. uniform sampler2D texture15;
  29. uniform sampler2D texture16;
  30. uniform sampler2D texture17;
  31. uniform sampler2D texture18;
  32. uniform sampler2D texture19;
  33. uniform sampler2D texture20;
  34. uniform sampler2D texture21;
  35. uniform sampler2D texture22;
  36. uniform sampler2D texture23;
  37. uniform sampler2D texture24;
  38. uniform sampler2D texture25;
  39. uniform sampler2D texture26;
  40. uniform sampler2D texture27;
  41. uniform sampler2D texture28;
  42. uniform sampler2D texture29;
  43. uniform sampler2D texture30;
  44. uniform sampler2D texture31;
  45.  
  46. void main()
  47. {
  48. int slot = int(fs_in.tex);
  49. if (slot == 0) {color = texture(texture0, fs_in.uv);}
  50. else if (slot == 1) {color = texture(texture1, fs_in.uv);}
  51. else if (slot == 2) {color = texture(texture2, fs_in.uv);}
  52. else if (slot == 3) {color = texture(texture3, fs_in.uv);}
  53. else if (slot == 4) {color = texture(texture4, fs_in.uv);}
  54. else if (slot == 5) {color = texture(texture5, fs_in.uv);}
  55. else if (slot == 6) {color = texture(texture6, fs_in.uv);}
  56. else if (slot == 7) {color = texture(texture7, fs_in.uv);}
  57. else if (slot == 8) {color = texture(texture8, fs_in.uv);}
  58. else if (slot == 9) {color = texture(texture9, fs_in.uv);}
  59. else if (slot == 10) {color = texture(texture10, fs_in.uv);}
  60. else if (slot == 11) {color = texture(texture11, fs_in.uv);}
  61. else if (slot == 12) {color = texture(texture12, fs_in.uv);}
  62. else if (slot == 13) {color = texture(texture13, fs_in.uv);}
  63. else if (slot == 14) {color = texture(texture14, fs_in.uv);}
  64. else if (slot == 15) {color = texture(texture15, fs_in.uv);}
  65. else if (slot == 16) {color = texture(texture16, fs_in.uv);}
  66. else if (slot == 17) {color = texture(texture17, fs_in.uv);}
  67. else if (slot == 18) {color = texture(texture10, fs_in.uv);}
  68. else if (slot == 19) {color = texture(texture11, fs_in.uv);}
  69. else if (slot == 20) {color = texture(texture12, fs_in.uv);}
  70. else if (slot == 21) {color = texture(texture13, fs_in.uv);}
  71. else if (slot == 22) {color = texture(texture14, fs_in.uv);}
  72. else if (slot == 23) {color = texture(texture15, fs_in.uv);}
  73. else if (slot == 24) {color = texture(texture16, fs_in.uv);}
  74. else if (slot == 25) {color = texture(texture17, fs_in.uv);}
  75. else if (slot == 26) {color = texture(texture11, fs_in.uv);}
  76. else if (slot == 27) {color = texture(texture12, fs_in.uv);}
  77. else if (slot == 28) {color = texture(texture13, fs_in.uv);}
  78. else if (slot == 29) {color = texture(texture14, fs_in.uv);}
  79. else if (slot == 30) {color = texture(texture15, fs_in.uv);}
  80. else if (slot == 31) {color = texture(texture16, fs_in.uv);}
  81. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement