Separated cursor and glint intensities from their colors, which can now safely reside in their color spaces.

This commit is contained in:
Rezmason
2022-11-01 08:05:48 -07:00
parent c7fafcdb13
commit acc21ef1f4
10 changed files with 76 additions and 28 deletions

View File

@@ -57,7 +57,7 @@ const makePalette = (regl, entries) => {
export default ({ regl, config }, inputs) => {
const output = makePassFBO(regl, config.useHalfFloat);
const paletteTex = makePalette(regl, config.palette);
const { backgroundColor, cursorColor, glintColor, ditherMagnitude } = config;
const { backgroundColor, cursorColor, glintColor, cursorIntensity, glintIntensity, ditherMagnitude } = config;
const palettePassFrag = loadText("shaders/glsl/palettePass.frag.glsl");
@@ -68,6 +68,8 @@ export default ({ regl, config }, inputs) => {
backgroundColor: colorToRGB(backgroundColor),
cursorColor: colorToRGB(cursorColor),
glintColor: colorToRGB(glintColor),
cursorIntensity,
glintIntensity,
ditherMagnitude,
tex: inputs.primary,
bloomTex: inputs.bloom,

View File

@@ -30,7 +30,7 @@ const prideStripeColors = [
export default ({ regl, config }, inputs) => {
const output = makePassFBO(regl, config.useHalfFloat);
const { backgroundColor, cursorColor, glintColor, ditherMagnitude } = config;
const { backgroundColor, cursorColor, glintColor, cursorIntensity, glintIntensity, ditherMagnitude } = config;
// Expand and convert stripe colors into 1D texture data
const stripeColors = "stripeColors" in config ? config.stripeColors : config.effect === "pride" ? prideStripeColors : transPrideStripeColors;
@@ -48,6 +48,8 @@ export default ({ regl, config }, inputs) => {
backgroundColor: colorToRGB(backgroundColor),
cursorColor: colorToRGB(cursorColor),
glintColor: colorToRGB(glintColor),
cursorIntensity,
glintIntensity,
ditherMagnitude,
tex: inputs.primary,
bloomTex: inputs.bloom,