Lakamfo

Color inverse with animation

Jun 5th, 2022 (edited)
327
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. shader_type canvas_item;
  2.  
  3. uniform float strength : hint_range(0.0, 1) = 1.0;
  4. uniform float cycle_speed : hint_range(0.1, 1) = 1.0;
  5. uniform float duration : hint_range(0.1, 1) = 1.0;
  6.  
  7. void fragment(){
  8.     vec4 color = texture(TEXTURE, UV);
  9.     COLOR = vec4(1.0 - color.rgb * strength, color.a) * cos(TIME * cycle_speed) / duration;
  10. }
Add Comment
Please, Sign In to add comment