🔧 KWin fixes

This commit is contained in:
Simon Schneegans
2022-06-20 05:57:57 +02:00
parent 3ec64ec585
commit e4b16ba599
+3 -3
View File
@@ -36,14 +36,14 @@ void main() {
vec2 flameRange = vec2(hideThreshold - FLAME_WIDTH, hideThreshold); vec2 flameRange = vec2(hideThreshold - FLAME_WIDTH, hideThreshold);
vec2 smokeRange = vec2(hideThreshold - SMOKE_WIDTH, hideThreshold); vec2 smokeRange = vec2(hideThreshold - SMOKE_WIDTH, hideThreshold);
vec2 uv = cogl_tex_coord_in[0].st / uScale * uSize; vec2 uv = iTexcoord / uScale * uSize;
float smokeNoise = float smokeNoise =
simplex2DFractal(uv * 0.01 + uSeed + uProgress * vec2(0.0, 0.3 * uDuration)); simplex2DFractal(uv * 0.01 + uSeed + uProgress * vec2(0.0, 0.3 * uDuration));
vec2 center = uSeed.x > uSeed.y ? vec2(uSeed.x, floor(uSeed.y + 0.5)) vec2 center = uSeed.x > uSeed.y ? vec2(uSeed.x, floor(uSeed.y + 0.5))
: vec2(floor(uSeed.x + 0.5), uSeed.y); : vec2(floor(uSeed.x + 0.5), uSeed.y);
float circle = length(cogl_tex_coord_in[0].st - center); float circle = length(iTexcoord - center);
float mask = mix(circle, smokeNoise, 0.2 * uTurbulence * uScale); float mask = mix(circle, smokeNoise, 0.2 * uTurbulence * uScale);
float smokeMask = float smokeMask =
@@ -64,7 +64,7 @@ void main() {
distort = vec2(dFdx(mask), dFdy(mask)) * scorchMask * 5.0; distort = vec2(dFdx(mask), dFdy(mask)) * scorchMask * 5.0;
} }
vec4 oColor = getInputColor(cogl_tex_coord_in[0].st + distort); vec4 oColor = getInputColor(iTexcoord + distort);
// Hide after buring zone has passed. // Hide after buring zone has passed.
if ((uForOpening && mask > smokeRange.y) || (!uForOpening && mask < smokeRange.y)) { if ((uForOpening && mask > smokeRange.y) || (!uForOpening && mask < smokeRange.y)) {