primarycolors.glsl 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. uniform sampler2D samp9;
  2. out vec4 ocol0;
  3. in vec2 uv0;
  4. void main()
  5. {
  6. vec4 c0 = texture(samp9, uv0);
  7. float red = c0.r;
  8. float blue = c0.b;
  9. float green = c0.g;
  10. float factor = 2;
  11. float max = 0.8;
  12. float min = 0.3;
  13. if(c0.r > c0.g && c0.b > c0.g){
  14. if(c0.r < c0.b + 0.05 && c0.b < c0.r + 0.05){
  15. red = 0.7;
  16. blue = 0.7;
  17. green = 0.05;
  18. }
  19. else if(c0.r > c0.b + 0.05){
  20. red = 0.7;
  21. blue = 0.05;
  22. green = 0.05;
  23. }
  24. else if (c0.b > c0.r + 0.05){
  25. red = 0.05;
  26. blue = 0.7;
  27. green = 0.05;
  28. }
  29. }
  30. if(c0.r > c0.b && c0.g > c0.b){
  31. if(c0.r < c0.g + 0.05 && c0.g < c0.r + 0.05){
  32. red = 0.7;
  33. blue = 0.05;
  34. green = 0.7;
  35. }
  36. else if(c0.r > c0.g + 0.05){
  37. red = 0.7;
  38. blue = 0.05;
  39. green = 0.05;
  40. }
  41. else if (c0.g > c0.r + 0.05){
  42. red = 0.05;
  43. blue = 0.05;
  44. green = 0.7;
  45. }
  46. }
  47. if(c0.g > c0.r && c0.b > c0.r){
  48. if(c0.g < c0.b + 0.05 && c0.b < c0.g + 0.05){
  49. red = 0.05;
  50. blue = 0.7;
  51. green = 0.7;
  52. }
  53. else if(c0.g > c0.b + 0.05){
  54. red = 0.05;
  55. blue = 0.05;
  56. green = 0.7;
  57. }
  58. else if (c0.b > c0.g + 0.05){
  59. red = 0.05;
  60. blue = 0.7;
  61. green = 0.05;
  62. }
  63. }
  64. ocol0 = vec4(red, green, blue, c0.a);
  65. }