Migrate builtin macros to '__' prefix
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
|
||||
#if PREMULTIPLY_ALPHA == 0
|
||||
#if __PREMULTIPLY_ALPHA == 0
|
||||
#error __disablestage
|
||||
#endif
|
||||
|
||||
@@ -11,7 +11,5 @@ in vec4 gl_FragCoord;
|
||||
|
||||
void main() {
|
||||
fragment = texelFetch(tex, ivec2(gl_FragCoord.x, gl_FragCoord.y), 0);
|
||||
#if PREMULTIPLY_ALPHA > 0
|
||||
fragment.rgb *= fragment.a;
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -34,14 +34,14 @@ float iscale_audio(float idx) {
|
||||
return -log((SAMPLE_RANGE) * idx) / (SAMPLE_SCALE);
|
||||
}
|
||||
|
||||
/* Note: the SMOOTH_FACTOR macro is defined by GLava itself, from `#request setsmoothfactor`*/
|
||||
/* Note: the __SMOOTH_FACTOR macro is defined by GLava itself, from `#request setsmoothfactor`*/
|
||||
|
||||
float smooth_audio(in sampler1D tex, int tex_sz, highp float idx) {
|
||||
|
||||
#if PRE_SMOOTHED_AUDIO < 1
|
||||
#if __PRE_SMOOTHED_AUDIO < 1
|
||||
float
|
||||
smin = scale_audio(clamp(idx - SMOOTH_FACTOR, 0, 1)) * tex_sz,
|
||||
smax = scale_audio(clamp(idx + SMOOTH_FACTOR, 0, 1)) * tex_sz;
|
||||
smin = scale_audio(clamp(idx - __SMOOTH_FACTOR, 0, 1)) * tex_sz,
|
||||
smax = scale_audio(clamp(idx + __SMOOTH_FACTOR, 0, 1)) * tex_sz;
|
||||
float m = ((smax - smin) / 2.0F), s, w;
|
||||
float rm = smin + m; /* middle */
|
||||
|
||||
|
||||
@@ -6,8 +6,8 @@ uniform int w;
|
||||
out vec4 fragment;
|
||||
in vec4 gl_FragCoord;
|
||||
|
||||
#undef PRE_SMOOTHED_AUDIO
|
||||
#define PRE_SMOOTHED_AUDIO 0
|
||||
#undef __PRE_SMOOTHED_AUDIO
|
||||
#define __PRE_SMOOTHED_AUDIO 0
|
||||
|
||||
#include ":util/smooth.glsl"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user