All colors are now color objects

This commit is contained in:
Rezmason
2022-09-28 09:57:42 -07:00
parent 22dd5e8678
commit 3828203876
5 changed files with 58 additions and 46 deletions

View File

@@ -44,7 +44,7 @@ const makePalette = (regl, entries) => {
return make1DTexture(
regl,
paletteColors.flat().map((i) => i * 0xff)
paletteColors.map((rgb) => [...rgb, 1])
);
};
@@ -65,9 +65,9 @@ export default ({ regl, config }, inputs) => {
frag: regl.prop("frag"),
uniforms: {
backgroundColor,
cursorColor,
glintColor,
backgroundColor: colorToRGB(backgroundColor),
cursorColor: colorToRGB(cursorColor),
glintColor: colorToRGB(glintColor),
ditherMagnitude,
bloomStrength,
tex: inputs.primary,