Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //Apologies for the blunt force trauma style of tackling this. I know jack shit about hint colors or different ranges.
- shader_type canvas_item;
- uniform int state = 0; //Determines which colors will be displayed.
- //Colors.
- uniform vec4 white1 : hint_color;
- uniform vec4 white2 : hint_color;
- uniform vec4 white3 : hint_color;
- uniform vec4 white4 : hint_color;
- uniform vec4 lblue1 : hint_color;
- uniform vec4 lblue2 : hint_color;
- uniform vec4 lblue3 : hint_color;
- uniform vec4 lblue4 : hint_color;
- uniform vec4 blue1 : hint_color;
- uniform vec4 blue2 : hint_color;
- uniform vec4 blue3 : hint_color;
- uniform vec4 blue4 : hint_color;
- uniform vec4 violet1 : hint_color;
- uniform vec4 violet2 : hint_color;
- uniform vec4 violet3 : hint_color;
- uniform vec4 violet4 : hint_color;
- uniform vec4 magenta1 : hint_color;
- uniform vec4 magenta2 : hint_color;
- uniform vec4 magenta3 : hint_color;
- uniform vec4 magenta4 : hint_color;
- uniform vec4 pink1 : hint_color;
- uniform vec4 pink2 : hint_color;
- uniform vec4 pink3 : hint_color;
- uniform vec4 pink4 : hint_color;
- uniform vec4 red1 : hint_color;
- uniform vec4 red2 : hint_color;
- uniform vec4 red3 : hint_color;
- uniform vec4 red4 : hint_color;
- uniform vec4 orange1 : hint_color;
- uniform vec4 orange2 : hint_color;
- uniform vec4 orange3 : hint_color;
- uniform vec4 orange4 : hint_color;
- uniform vec4 yellow1 : hint_color;
- uniform vec4 yellow2 : hint_color;
- uniform vec4 yellow3 : hint_color;
- uniform vec4 yellow4 : hint_color;
- uniform vec4 lgreen1 : hint_color;
- uniform vec4 lgreen2 : hint_color;
- uniform vec4 lgreen3 : hint_color;
- uniform vec4 lgreen4 : hint_color;
- uniform vec4 green1 : hint_color;
- uniform vec4 green2 : hint_color;
- uniform vec4 green3 : hint_color;
- uniform vec4 green4 : hint_color;
- uniform vec4 teal1 : hint_color;
- uniform vec4 teal2 : hint_color;
- uniform vec4 teal3 : hint_color;
- uniform vec4 teal4 : hint_color;
- uniform vec4 turq1 : hint_color;
- uniform vec4 turq2 : hint_color;
- uniform vec4 turq3 : hint_color;
- uniform vec4 turq4 : hint_color;
- uniform vec4 grey1 : hint_color;
- uniform vec4 grey2 : hint_color;
- uniform vec4 grey3 : hint_color;
- uniform vec4 black1 : hint_color;
- uniform vec4 black2 : hint_color;
- uniform vec4 black3 : hint_color;
- uniform vec4 black4 : hint_color;
- //Famicom extra colors.
- uniform vec4 famred1 : hint_color;
- uniform vec4 famred2 : hint_color;
- uniform vec4 famyellow1 : hint_color;
- uniform vec4 famyellow2 : hint_color;
- uniform vec4 famtan1 : hint_color;
- uniform vec4 famtan2 : hint_color;
- uniform vec4 famskin : hint_color;
- uniform vec4 famblue : hint_color;
- void fragment() {
- //Grab current color.
- vec4 currColor = texture(TEXTURE,UV); // Get current color of pixel
- if (state == 0) { //Initial state. All colors normal.
- //White
- if (currColor == white1) {
- COLOR = white1;
- }
- if (currColor == white2) {
- COLOR = white2;
- }
- if (currColor == white3) {
- COLOR = white3;
- }
- if (currColor == white4) {
- COLOR = white4;
- }
- //Light blue.
- if (currColor == lblue1) {
- COLOR = lblue1;
- }
- if (currColor == lblue2) {
- COLOR = lblue2;
- }
- if (currColor == lblue3) {
- COLOR = lblue3;
- }
- if (currColor == lblue4) {
- COLOR = lblue4;
- }
- //Blue.
- if (currColor == blue1) {
- COLOR = blue1;
- }
- if (currColor == blue2) {
- COLOR = blue2;
- }
- if (currColor == blue3) {
- COLOR = blue3;
- }
- if (currColor == blue4) {
- COLOR = blue4;
- }
- //Violet
- if (currColor == violet1) {
- COLOR = violet1;
- }
- if (currColor == violet2) {
- COLOR = violet2;
- }
- if (currColor == violet3) {
- COLOR = violet3;
- }
- if (currColor == violet4) {
- COLOR = violet4;
- }
- //Magenta
- if (currColor == magenta1) {
- COLOR = magenta1;
- }
- if (currColor == magenta2) {
- COLOR = magenta2;
- }
- if (currColor == magenta3) {
- COLOR = magenta3;
- }
- if (currColor == magenta4) {
- COLOR = magenta4;
- }
- //Pink
- if (currColor == pink1) {
- COLOR = pink1;
- }
- if (currColor == pink2) {
- COLOR = pink2;
- }
- if (currColor == pink3) {
- COLOR = pink3;
- }
- if (currColor == pink4) {
- COLOR = pink4;
- }
- //Red
- if (currColor == red1) {
- COLOR = red1;
- }
- if (currColor == red2) {
- COLOR = red2;
- }
- if (currColor == red3) {
- COLOR = red3;
- }
- if (currColor == red4) {
- COLOR = red4;
- }
- //Orange
- if (currColor == orange1) {
- COLOR = orange1;
- }
- if (currColor == orange2) {
- COLOR = orange2;
- }
- if (currColor == orange3) {
- COLOR = orange3;
- }
- if (currColor == orange4) {
- COLOR = orange4;
- }
- //Yellow
- if (currColor == yellow1) {
- COLOR = yellow1;
- }
- if (currColor == yellow2) {
- COLOR = yellow2;
- }
- if (currColor == yellow3) {
- COLOR = yellow3;
- }
- if (currColor == yellow4) {
- COLOR = yellow4;
- }
- //Light green.
- if (currColor == lgreen1) {
- COLOR = lgreen1;
- }
- if (currColor == lgreen2) {
- COLOR = lgreen2;
- }
- if (currColor == lgreen3) {
- COLOR = lgreen3;
- }
- if (currColor == lgreen4) {
- COLOR = lgreen4;
- }
- //Green
- if (currColor == green1) {
- COLOR = green1;
- }
- if (currColor == green2) {
- COLOR = green2;
- }
- if (currColor == green3) {
- COLOR = green3;
- }
- if (currColor == green4) {
- COLOR = green4;
- }
- //Teal
- if (currColor == teal1) {
- COLOR = teal1;
- }
- if (currColor == teal2) {
- COLOR = teal2;
- }
- if (currColor == teal3) {
- COLOR = teal3;
- }
- if (currColor == teal4) {
- COLOR = teal4;
- }
- //Turquoise
- if (currColor == turq1) {
- COLOR = turq1;
- }
- if (currColor == turq2) {
- COLOR = turq2;
- }
- if (currColor == turq3) {
- COLOR = turq3;
- }
- if (currColor == turq4) {
- COLOR = turq4;
- }
- //Grey
- if (currColor == grey1) {
- COLOR = grey1;
- }
- if (currColor == grey2) {
- COLOR = grey2;
- }
- if (currColor == grey3) {
- COLOR = grey3;
- }
- //Black
- if (currColor == black1) {
- COLOR = black1;
- }
- if (currColor == black2) {
- COLOR = black2;
- }
- if (currColor == black3) {
- COLOR = black3;
- }
- if (currColor == black4) {
- COLOR = black4;
- }
- //Famicom extras.
- if (currColor == famred1) {
- COLOR = famred1;
- }
- if (currColor == famred2) {
- COLOR = famred2;
- }
- if (currColor == famyellow1) {
- COLOR = famyellow1;
- }
- if (currColor == famyellow2) {
- COLOR = famyellow2;
- }
- if (currColor == famtan1) {
- COLOR = famtan1;
- }
- if (currColor == famtan2) {
- COLOR = famtan2;
- }
- if (currColor == famskin) {
- COLOR = famskin;
- }
- if (currColor == famblue) {
- COLOR = famblue;
- }
- }
- if (state == 1) { //Dark step 1.
- //White
- //Whites are entirely too bright for the fade effect, so I'll be mixing greys in as well.
- if (currColor == white1) {
- COLOR = grey1;
- }
- if (currColor == white2) {
- COLOR = grey2;
- }
- if (currColor == white3) {
- COLOR = grey3;
- }
- if (currColor == white4) {
- COLOR = black4;
- }
- //Light blue.
- if (currColor == lblue1) {
- COLOR = lblue2;
- }
- if (currColor == lblue2) {
- COLOR = lblue3;
- }
- if (currColor == lblue3) {
- COLOR = lblue4;
- }
- if (currColor == lblue4) {
- COLOR = black4;
- }
- //Blue.
- if (currColor == blue1) {
- COLOR = blue2;
- }
- if (currColor == blue2) {
- COLOR = blue3;
- }
- if (currColor == blue3) {
- COLOR = blue4;
- }
- if (currColor == blue4) {
- COLOR = black4;
- }
- //Violet
- if (currColor == violet1) {
- COLOR = violet2;
- }
- if (currColor == violet2) {
- COLOR = violet3;
- }
- if (currColor == violet3) {
- COLOR = violet4;
- }
- if (currColor == violet4) {
- COLOR = black4;
- }
- //Magenta
- if (currColor == magenta1) {
- COLOR = magenta2;
- }
- if (currColor == magenta2) {
- COLOR = magenta3;
- }
- if (currColor == magenta3) {
- COLOR = magenta4;
- }
- if (currColor == magenta4) {
- COLOR = black4;
- }
- //Pink
- if (currColor == pink1) {
- COLOR = pink2;
- }
- if (currColor == pink2) {
- COLOR = pink3;
- }
- if (currColor == pink3) {
- COLOR = pink4;
- }
- if (currColor == pink4) {
- COLOR = black4;
- }
- //Red
- if (currColor == red1) {
- COLOR = red2;
- }
- if (currColor == red2) {
- COLOR = red3;
- }
- if (currColor == red3) {
- COLOR = red4;
- }
- if (currColor == red4) {
- COLOR = black4;
- }
- //Orange
- if (currColor == orange1) {
- COLOR = orange2;
- }
- if (currColor == orange2) {
- COLOR = orange3;
- }
- if (currColor == orange3) {
- COLOR = orange4;
- }
- if (currColor == orange4) {
- COLOR = black4;
- }
- //Yellow
- if (currColor == yellow1) {
- COLOR = yellow2;
- }
- if (currColor == yellow2) {
- COLOR = yellow3;
- }
- if (currColor == yellow3) {
- COLOR = yellow4;
- }
- if (currColor == yellow4) {
- COLOR = black4;
- }
- //Light green.
- if (currColor == lgreen1) {
- COLOR = lgreen2;
- }
- if (currColor == lgreen2) {
- COLOR = lgreen3;
- }
- if (currColor == lgreen3) {
- COLOR = lgreen4;
- }
- if (currColor == lgreen4) {
- COLOR = black4;
- }
- //Green
- if (currColor == green1) {
- COLOR = green2;
- }
- if (currColor == green2) {
- COLOR = green3;
- }
- if (currColor == green3) {
- COLOR = green4;
- }
- if (currColor == green4) {
- COLOR = black4;
- }
- //Teal
- if (currColor == teal1) {
- COLOR = teal2;
- }
- if (currColor == teal2) {
- COLOR = teal3;
- }
- if (currColor == teal3) {
- COLOR = teal4;
- }
- if (currColor == teal4) {
- COLOR = black4;
- }
- //Turquoise
- if (currColor == turq1) {
- COLOR = turq2;
- }
- if (currColor == turq2) {
- COLOR = turq3;
- }
- if (currColor == turq3) {
- COLOR = turq4;
- }
- if (currColor == turq4) {
- COLOR = black4;
- }
- //Grey
- if (currColor == grey1) {
- COLOR = grey2;
- }
- if (currColor == grey2) {
- COLOR = grey3;
- }
- if (currColor == grey3) {
- COLOR = black4;
- }
- //Black
- if (currColor == black1) {
- COLOR = black2;
- }
- if (currColor == black2) {
- COLOR = black3;
- }
- if (currColor == black3) {
- COLOR = black4;
- }
- if (currColor == black4) {
- COLOR = black4;
- }
- //Famicom extras.
- if (currColor == famred1) {
- COLOR = famred2;
- }
- if (currColor == famred2) {
- COLOR = black4;
- }
- if (currColor == famyellow1) {
- COLOR = famyellow2;
- }
- if (currColor == famyellow2) {
- COLOR = black4;
- }
- if (currColor == famtan1) {
- COLOR = famtan2;
- }
- if (currColor == famtan2) {
- COLOR = black4;
- }
- if (currColor == famskin) {
- COLOR = famtan1;
- }
- if (currColor == famblue) {
- COLOR = black4;
- }
- }
- if (state == 2) { //Darkened halfway
- //White
- //Whites are entirely too bright for the fade effect, so I'll be mixing greys in as well.
- if (currColor == white1) {
- COLOR = grey2;
- }
- if (currColor == white2) {
- COLOR = grey3;
- }
- if (currColor == white3) {
- COLOR = black4;
- }
- if (currColor == white4) {
- COLOR = black4;
- }
- //Light blue.
- if (currColor == lblue1) {
- COLOR = lblue3;
- }
- if (currColor == lblue2) {
- COLOR = lblue4;
- }
- if (currColor == lblue3) {
- COLOR = black4;
- }
- if (currColor == lblue4) {
- COLOR = black4;
- }
- //Blue.
- if (currColor == blue1) {
- COLOR = blue3;
- }
- if (currColor == blue2) {
- COLOR = blue4;
- }
- if (currColor == blue3) {
- COLOR = black4;
- }
- if (currColor == blue4) {
- COLOR = black4;
- }
- //Violet
- if (currColor == violet1) {
- COLOR = violet3;
- }
- if (currColor == violet2) {
- COLOR = violet4;
- }
- if (currColor == violet3) {
- COLOR = black4;
- }
- if (currColor == violet4) {
- COLOR = black4;
- }
- //Magenta
- if (currColor == magenta1) {
- COLOR = magenta3;
- }
- if (currColor == magenta2) {
- COLOR = magenta4;
- }
- if (currColor == magenta3) {
- COLOR = black4;
- }
- if (currColor == magenta4) {
- COLOR = black4;
- }
- //Pink
- if (currColor == pink1) {
- COLOR = pink3;
- }
- if (currColor == pink2) {
- COLOR = pink4;
- }
- if (currColor == pink3) {
- COLOR = black4;
- }
- if (currColor == pink4) {
- COLOR = black4;
- }
- //Red
- if (currColor == red1) {
- COLOR = red3;
- }
- if (currColor == red2) {
- COLOR = red4;
- }
- if (currColor == red3) {
- COLOR = black4;
- }
- if (currColor == red4) {
- COLOR = black4;
- }
- //Orange
- if (currColor == orange1) {
- COLOR = orange3;
- }
- if (currColor == orange2) {
- COLOR = orange4;
- }
- if (currColor == orange3) {
- COLOR = black4;
- }
- if (currColor == orange4) {
- COLOR = black4;
- }
- //Yellow
- if (currColor == yellow1) {
- COLOR = yellow3;
- }
- if (currColor == yellow2) {
- COLOR = yellow4;
- }
- if (currColor == yellow3) {
- COLOR = black4;
- }
- if (currColor == yellow4) {
- COLOR = black4;
- }
- //Light green.
- if (currColor == lgreen1) {
- COLOR = lgreen3;
- }
- if (currColor == lgreen2) {
- COLOR = lgreen4;
- }
- if (currColor == lgreen3) {
- COLOR = black4;
- }
- if (currColor == lgreen4) {
- COLOR = black4;
- }
- //Green
- if (currColor == green1) {
- COLOR = green3;
- }
- if (currColor == green2) {
- COLOR = green4;
- }
- if (currColor == green3) {
- COLOR = black4;
- }
- if (currColor == green4) {
- COLOR = black4;
- }
- //Teal
- if (currColor == teal1) {
- COLOR = teal3;
- }
- if (currColor == teal2) {
- COLOR = teal4;
- }
- if (currColor == teal3) {
- COLOR = black4;
- }
- if (currColor == teal4) {
- COLOR = black4;
- }
- //Turquoise
- if (currColor == turq1) {
- COLOR = turq3;
- }
- if (currColor == turq2) {
- COLOR = turq4;
- }
- if (currColor == turq3) {
- COLOR = black4;
- }
- if (currColor == turq4) {
- COLOR = black4;
- }
- //Grey
- if (currColor == grey1) {
- COLOR = black4;
- }
- if (currColor == grey2) {
- COLOR = black4;
- }
- if (currColor == grey3) {
- COLOR = black4;
- }
- //Black
- if (currColor == black1) {
- COLOR = black3;
- }
- if (currColor == black2) {
- COLOR = black4;
- }
- if (currColor == black3) {
- COLOR = black4;
- }
- if (currColor == black4) {
- COLOR = black4;
- }
- //Famicom extras.
- if (currColor == famred1) {
- COLOR = black4;
- }
- if (currColor == famred2) {
- COLOR = black4;
- }
- if (currColor == famyellow1) {
- COLOR = black4;
- }
- if (currColor == famyellow2) {
- COLOR = black4;
- }
- if (currColor == famtan1) {
- COLOR = black4;
- }
- if (currColor == famtan2) {
- COLOR = black4;
- }
- if (currColor == famskin) {
- COLOR = famtan2;
- }
- if (currColor == famblue) {
- COLOR = black4;
- }
- }
- if (state == 3) { //Almost completely dark.
- //White
- //Whites are entirely too bright for the fade effect, so I'll be mixing greys in as well.
- if (currColor == white1) {
- COLOR = grey3;
- }
- if (currColor == white2) {
- COLOR = black4;
- }
- if (currColor == white3) {
- COLOR = black4;
- }
- if (currColor == white4) {
- COLOR = black4;
- }
- //Light blue.
- if (currColor == lblue1) {
- COLOR = lblue4;
- }
- if (currColor == lblue2) {
- COLOR = black4;
- }
- if (currColor == lblue3) {
- COLOR = black4;
- }
- if (currColor == lblue4) {
- COLOR = black4;
- }
- //Blue.
- if (currColor == blue1) {
- COLOR = blue4;
- }
- if (currColor == blue2) {
- COLOR = black4;
- }
- if (currColor == blue3) {
- COLOR = black4;
- }
- if (currColor == blue4) {
- COLOR = black4;
- }
- //Violet
- if (currColor == violet1) {
- COLOR = violet4;
- }
- if (currColor == violet2) {
- COLOR = black4;
- }
- if (currColor == violet3) {
- COLOR = black4;
- }
- if (currColor == violet4) {
- COLOR = black4;
- }
- //Magenta
- if (currColor == magenta1) {
- COLOR = magenta4;
- }
- if (currColor == magenta2) {
- COLOR = black4;
- }
- if (currColor == magenta3) {
- COLOR = black4;
- }
- if (currColor == magenta4) {
- COLOR = black4;
- }
- //Pink
- if (currColor == pink1) {
- COLOR = pink4;
- }
- if (currColor == pink2) {
- COLOR = black4;
- }
- if (currColor == pink3) {
- COLOR = black4;
- }
- if (currColor == pink4) {
- COLOR = black4;
- }
- //Red
- if (currColor == red1) {
- COLOR = red4;
- }
- if (currColor == red2) {
- COLOR = black4;
- }
- if (currColor == red3) {
- COLOR = black4;
- }
- if (currColor == red4) {
- COLOR = black4;
- }
- //Orange
- if (currColor == orange1) {
- COLOR = orange4;
- }
- if (currColor == orange2) {
- COLOR = black4;
- }
- if (currColor == orange3) {
- COLOR = black4;
- }
- if (currColor == orange4) {
- COLOR = black4;
- }
- //Yellow
- if (currColor == yellow1) {
- COLOR = yellow4;
- }
- if (currColor == yellow2) {
- COLOR = black4;
- }
- if (currColor == yellow3) {
- COLOR = black4;
- }
- if (currColor == yellow4) {
- COLOR = black4;
- }
- //Light green.
- if (currColor == lgreen1) {
- COLOR = lgreen4;
- }
- if (currColor == lgreen2) {
- COLOR = black4;
- }
- if (currColor == lgreen3) {
- COLOR = black4;
- }
- if (currColor == lgreen4) {
- COLOR = black4;
- }
- //Green
- if (currColor == green1) {
- COLOR = green4;
- }
- if (currColor == green2) {
- COLOR = black4;
- }
- if (currColor == green3) {
- COLOR = black4;
- }
- if (currColor == green4) {
- COLOR = black4;
- }
- //Teal
- if (currColor == teal1) {
- COLOR = teal4;
- }
- if (currColor == teal2) {
- COLOR = black4;
- }
- if (currColor == teal3) {
- COLOR = black4;
- }
- if (currColor == teal4) {
- COLOR = black4;
- }
- //Turquoise
- if (currColor == turq1) {
- COLOR = turq4;
- }
- if (currColor == turq2) {
- COLOR = black4;
- }
- if (currColor == turq3) {
- COLOR = black4;
- }
- if (currColor == turq4) {
- COLOR = black4;
- }
- //Grey
- if (currColor == grey1) {
- COLOR = black4;
- }
- if (currColor == grey2) {
- COLOR = black4;
- }
- if (currColor == grey3) {
- COLOR = black4;
- }
- //Black
- if (currColor == black1) {
- COLOR = black4;
- }
- if (currColor == black2) {
- COLOR = black4;
- }
- if (currColor == black3) {
- COLOR = black4;
- }
- if (currColor == black4) {
- COLOR = black4;
- }
- //Famicom extras.
- if (currColor == famred1) {
- COLOR = black4;
- }
- if (currColor == famred2) {
- COLOR = black4;
- }
- if (currColor == famyellow1) {
- COLOR = black4;
- }
- if (currColor == famyellow2) {
- COLOR = black4;
- }
- if (currColor == famtan1) {
- COLOR = black4;
- }
- if (currColor == famtan2) {
- COLOR = black4;
- }
- if (currColor == famskin) {
- COLOR = black4;
- }
- if (currColor == famblue) {
- COLOR = black4;
- }
- }
- if (state == 4) { //All black.
- COLOR = black4;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement