Renaming paletteEntries to palette

This commit is contained in:
Rezmason
2022-09-27 22:30:50 -07:00
parent 22458dad93
commit cde709b044
8 changed files with 34 additions and 29 deletions

View File

@@ -13,6 +13,7 @@ import getLKG from "./lkgHelper.js";
const effects = {
none: null,
plain: makePalettePass,
palette: makePalettePass,
customStripes: makeStripePass,
stripes: makeStripePass,
pride: makeStripePass,
@@ -72,7 +73,7 @@ export default async (canvas, config) => {
// All this takes place in a full screen quad.
const fullScreenQuad = makeFullScreenQuad(regl);
const effectName = config.effect in effects ? config.effect : "plain";
const effectName = config.effect in effects ? config.effect : "palette";
const context = { regl, config, lkg, cameraTex, cameraAspectRatio };
const pipeline = makePipeline(context, [makeRain, makeBloomPass, effects[effectName], makeQuiltPass]);
const screenUniforms = { tex: pipeline[pipeline.length - 1].outputs.primary };

View File

@@ -64,7 +64,7 @@ const makePalette = (regl, entries) => {
export default ({ regl, config }, inputs) => {
const output = makePassFBO(regl, config.useHalfFloat);
const palette = makePalette(regl, config.paletteEntries);
const paletteTex = makePalette(regl, config.palette);
const { backgroundColor, cursorColor, glintColor, ditherMagnitude, bloomStrength } = config;
const palettePassFrag = loadText("shaders/glsl/palettePass.frag.glsl");
@@ -80,7 +80,7 @@ export default ({ regl, config }, inputs) => {
bloomStrength,
tex: inputs.primary,
bloomTex: inputs.bloom,
palette,
paletteTex,
},
framebuffer: output,
});

View File

@@ -12,9 +12,9 @@ const transPrideStripeColors = [
[0.96, 0.66, 0.72],
[0.96, 0.66, 0.72],
[0.96, 0.66, 0.72],
[1.00, 1.00, 1.00],
[1.00, 1.00, 1.00],
[1.00, 1.00, 1.00],
[1.0, 1.0, 1.0],
[1.0, 1.0, 1.0],
[1.0, 1.0, 1.0],
[0.96, 0.66, 0.72],
[0.96, 0.66, 0.72],
[0.96, 0.66, 0.72],
@@ -26,14 +26,14 @@ const transPrideStripeColors = [
const prideStripeColors = [
[0.89, 0.01, 0.01],
[0.89, 0.01, 0.01],
[1.00, 0.55, 0.00],
[1.00, 0.55, 0.00],
[1.00, 0.93, 0.00],
[1.00, 0.93, 0.00],
[0.00, 0.50, 0.15],
[0.00, 0.50, 0.15],
[0.00, 0.30, 1.00],
[0.00, 0.30, 1.00],
[1.0, 0.55, 0.0],
[1.0, 0.55, 0.0],
[1.0, 0.93, 0.0],
[1.0, 0.93, 0.0],
[0.0, 0.5, 0.15],
[0.0, 0.5, 0.15],
[0.0, 0.3, 1.0],
[0.0, 0.3, 1.0],
[0.46, 0.03, 0.53],
[0.46, 0.03, 0.53],
].flat();