Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit ed5fe204 authored by John Stiles's avatar John Stiles
Browse files

Avoid accidental shadowing in AGSL code.

We were shadowing the `turbulence` function with a variable of the
same name. This isn't illegal, but it is not a good idea to do this.
Renamed the variable to `turb`.

Change-Id: Ic2046d2ffe507f03e53a947a884114dd660b143e
parent 0c175e28
Loading
Loading
Loading
Loading
+2 −3
Original line number Diff line number Diff line
@@ -109,9 +109,8 @@ final class RippleShader extends RuntimeShader {
            + "    float alpha = min(fadeIn, 1. - fadeOutNoise);\n"
            + "    vec2 uv = p * in_resolutionScale;\n"
            + "    vec2 densityUv = uv - mod(uv, in_noiseScale);\n"
            + "    float turbulence = turbulence(uv, in_turbulencePhase);\n"
            + "    float sparkleAlpha = sparkles(densityUv, in_noisePhase) * ring * alpha "
            + "* turbulence;\n"
            + "    float turb = turbulence(uv, in_turbulencePhase);\n"
            + "    float sparkleAlpha = sparkles(densityUv, in_noisePhase) * ring * alpha * turb;\n"
            + "    float fade = min(fadeIn, 1. - fadeOutRipple);\n"
            + "    float waveAlpha = softCircle(p, center, in_maxRadius * scaleIn, 1.) * fade "
            + "* in_color.a;\n"