Skip to content

Instantly share code, notes, and snippets.

@davschne
Created August 23, 2019 21:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save davschne/33d8830d03128de6e52c530261d8327c to your computer and use it in GitHub Desktop.
Save davschne/33d8830d03128de6e52c530261d8327c to your computer and use it in GitHub Desktop.
// ... obtain old and new pixel values as before
// compute the color of the old pixel
vec4 colorA = computeColor(
pixelFloatValueA,
colorScaleA,
sentinelValuesA,
colorScaleLengthA,
sentinelValuesLengthA
);
// compute the color of the new pixel
vec4 colorB = computeColor(
pixelFloatValueB,
colorScaleB,
sentinelValuesB,
colorScaleLengthB,
sentinelValuesLengthB
);
// interpolate between the colors
gl_FragColor = mix(colorA, colorB, interpolationFraction);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment