Cubic interpolation for joining graph channels

This commit is contained in:
Theo Müller
2019-01-31 12:05:05 +01:00
parent 91530dfc49
commit 8cbf7bc579

View File

@@ -92,7 +92,7 @@ float get_line_height(in sampler1D tex, float idx) {
float fact = clamp((abs((screen.x / 2) - gl_FragCoord.x) / screen.x) * 48, 0.0F, 1.0F); float fact = clamp((abs((screen.x / 2) - gl_FragCoord.x) / screen.x) * 48, 0.0F, 1.0F);
#if JOIN_CHANNELS > 0 #if JOIN_CHANNELS > 0
fact = pow(fact, 1.8); /* To avoid spikes */ fact = -2 * pow(fact, 3) + 3 * pow(fact, 2); /* To avoid spikes */
s = fact * s + (1 - fact) * middle; s = fact * s + (1 - fact) * middle;
#else #else
s *= fact; s *= fact;