🔧 Use generic i/o names

This commit is contained in:
Simon Schneegans
2022-05-28 05:56:04 +02:00
parent c635336a7e
commit 74bd7cdef8
13 changed files with 152 additions and 127 deletions
+5 -5
View File
@@ -30,7 +30,7 @@ void main() {
// Choose a random suction center.
vec2 center = uSeed * uRandomness + 0.5 * (1.0 - uRandomness);
vec2 coords = cogl_tex_coord_in[0].st * ACTOR_SCALE - PADDING - center;
vec2 coords = iTexCoord.st * ACTOR_SCALE - PADDING - center;
// Add some shaking.
coords.x +=
@@ -49,11 +49,11 @@ void main() {
coords = vec2(dot(coords, vec2(c, -s)), dot(coords, vec2(s, c)));
// Shell.GLSLEffect uses straight alpha. So we have to convert from premultiplied.
cogl_color_out = texture2D(uTexture, coords + center);
if (cogl_color_out.a > 0) {
cogl_color_out.rgb /= cogl_color_out.a;
oColor = texture2D(uTexture, coords + center);
if (oColor.a > 0) {
oColor.rgb /= oColor.a;
}
// Fade out the window texture.
cogl_color_out.a *= 1.0 - progress;
oColor.a *= 1.0 - progress;
}