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
This commit is contained in:
parent
0c175e28e5
commit
ed5fe20479
@ -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"
|
||||
|
Loading…
x
Reference in New Issue
Block a user