Make joining optional
This commit is contained in:
@@ -22,6 +22,8 @@
|
||||
#define ANTI_ALIAS 0
|
||||
/* outline color */
|
||||
#define OUTLINE #262626
|
||||
/* 1 to join the two channels together in the middle, 0 to clamp both down to zero */
|
||||
#define JOIN_CHANNELS 0
|
||||
/* 1 to invert (vertically), 0 otherwise */
|
||||
#define INVERT 0
|
||||
|
||||
|
||||
@@ -91,8 +91,12 @@ float get_line_height(in sampler1D tex, float idx) {
|
||||
/* clamp far ends of the screen down to make the ends of the graph smoother */
|
||||
|
||||
float fact = clamp((abs((screen.x / 2) - gl_FragCoord.x) / screen.x) * 48, 0.0F, 1.0F);
|
||||
#if JOIN_CHANNELS > 0
|
||||
fact = pow(fact, 1.8); /* To avoid spikes */
|
||||
s = fact * s + (1 - fact) * middle;
|
||||
#else
|
||||
s *= fact;
|
||||
#endif
|
||||
|
||||
s *= clamp((min(gl_FragCoord.x, screen.x - gl_FragCoord.x) / screen.x) * 48, 0.0F, 1.0F);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user