Project SAM is the successor to Project-AL. A Platformer developed in the Godot 3.0.6 engine
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

29 lines
898B

  1. shader_type canvas_item;
  2. uniform vec4 base_color : hint_color = vec4(128,128,128,255);
  3. uniform vec4 mid_dark_color : hint_color = vec4(96, 96, 96, 255);
  4. uniform vec4 dark_color: hint_color = vec4(48, 48, 48, 255);
  5. uniform vec4 mid_lite_color : hint_color = vec4(160, 160, 160, 255);
  6. uniform vec4 lite_color : hint_color = vec4(192, 192, 192, 255);
  7. void fragment() {
  8. float base = 128.0/255.0;
  9. float md = 96.0/255.0;
  10. float dark = 48.0/255.0;
  11. float ml = 160.0/255.0;
  12. float lite = 192.0/255.0;
  13. vec4 color = texture(TEXTURE, UV);
  14. if (color == vec4(base,base,base,1.0)){
  15. color = base_color;
  16. } else if (color == vec4(md,md,md,1.0)){
  17. color = mid_dark_color;
  18. } else if (color == vec4(dark,dark,dark,1.0)){
  19. color = dark_color;
  20. } else if (color == vec4(ml,ml,ml,1.0)){
  21. color = mid_lite_color;
  22. } else if (color == vec4(lite,lite,lite,1.0)){
  23. color = lite_color;
  24. }
  25. COLOR = color;
  26. }