Skip to content

Commit

Permalink
closes #594
Browse files Browse the repository at this point in the history
I didn't test this btw, this is just more of a quick hotfix
  • Loading branch information
moxie-coder authored Sep 20, 2024
1 parent ba3c14c commit f18243a
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions source/shaders/RGBPalette.hx
Original file line number Diff line number Diff line change
Expand Up @@ -12,25 +12,29 @@ class RGBPalette {

private function set_r(color:FlxColor) {
r = color;
shader.r.value = [color.redFloat, color.greenFloat, color.blueFloat];
if (shader != null)
shader.r.value = [color.redFloat, color.greenFloat, color.blueFloat];
return color;
}

private function set_g(color:FlxColor) {
g = color;
shader.g.value = [color.redFloat, color.greenFloat, color.blueFloat];
if (shader != null)
shader.g.value = [color.redFloat, color.greenFloat, color.blueFloat];
return color;
}

private function set_b(color:FlxColor) {
b = color;
shader.b.value = [color.redFloat, color.greenFloat, color.blueFloat];
if (shader != null)
shader.b.value = [color.redFloat, color.greenFloat, color.blueFloat];
return color;
}

private function set_mult(value:Float) {
mult = FlxMath.bound(value, 0, 1);
shader.mult.value = [mult];
if (shader != null)
shader.mult.value = [mult];
return mult;
}

Expand Down

0 comments on commit f18243a

Please sign in to comment.