Advertisement
acegiak

Untitled

Dec 18th, 2021
154
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.16 KB | None | 0 0
  1. shader_type canvas_item;
  2.  
  3.  
  4.  
  5. void vertex() {
  6. // Output:0
  7.  
  8. }
  9.  
  10. void fragment() {
  11. // Input:3
  12. vec3 n_out3p0 = vec3(UV, 0.0);
  13.  
  14. // Input:4
  15.  
  16. // INITIAL TEXTURE LOOKUP
  17. vec3 n_out2p0;
  18. float n_out2p1;
  19. {
  20. vec4 TEXTURE_tex_read = texture(TEXTURE, n_out3p0.xy);
  21. n_out2p0 = TEXTURE_tex_read.rgb;
  22. n_out2p1 = TEXTURE_tex_read.a;
  23. }
  24.  
  25. // RGB TO HSV
  26. vec3 n_out5p0;
  27. {
  28. vec3 c = n_out2p0;
  29. vec4 K = vec4(0.0, -1.0 / 3.0, 2.0 / 3.0, -1.0);
  30. vec4 p = mix(vec4(c.bg, K.wz), vec4(c.gb, K.xy), step(c.b, c.g));
  31. vec4 q = mix(vec4(p.xyw, c.r), vec4(c.r, p.yzx), step(p.x, c.r));
  32. float d = q.x - min(q.w, q.y);
  33. float e = 1.0e-10;
  34. n_out5p0 = vec3(abs(q.z + (q.w - q.y) / (6.0 * d + e)), d / (q.x + e), q.x);
  35. }
  36.  
  37. // ADD TO THE HUE
  38. vec3 n_in7p1 = vec3(0.10000, 0.00000, 0.00000);
  39. vec3 n_out7p0 = n_out5p0 + n_in7p1;
  40.  
  41. // HSV TO RGB
  42. vec3 n_out6p0;
  43. {
  44. vec3 c = n_out7p0;
  45. vec4 K = vec4(1.0, 2.0 / 3.0, 1.0 / 3.0, 3.0);
  46. vec3 p = abs(fract(c.xxx + K.xyz) * 6.0 - K.www);
  47. n_out6p0 = c.z * mix(K.xxx, clamp(p - K.xxx, 0.0, 1.0), c.y);
  48. }
  49.  
  50. // OUTPUT COLOUR
  51. COLOR.rgb = n_out6p0;
  52. COLOR.a = n_out2p1;
  53.  
  54. }
  55.  
  56. void light() {
  57. // Output:0
  58.  
  59. }
  60.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement