Merge branch 'main' into feature/magic-lamp

This commit is contained in:
Simon Schneegans
2023-08-02 13:49:00 +02:00
227 changed files with 3463 additions and 2444 deletions
+10 -6
View File
@@ -1,12 +1,12 @@
{
"gold": [
{
"name": "Maxence Sebald",
"url": ""
"name": "D3vil0p3r",
"url": "https://github.com/D3vil0p3r"
},
{
"name": "Dennis ten Hoove",
"url": "https://github.com/dennis1248"
"name": "Maxence Sebald",
"url": ""
}
],
"silver": [
@@ -20,6 +20,10 @@
}
],
"bronze": [
{
"name": "@SubOptimal",
"url": "https://github.com/SubOptimal"
},
{
"name": "@vlazic",
"url": "https://github.com/vlazic"
@@ -27,8 +31,8 @@
],
"past": [
{
"name": "D3vil0p3r",
"url": "https://github.com/D3vil0p3r"
"name": "Dennis ten Hoove",
"url": "https://github.com/dennis1248"
},
{
"name": "@MRR-dev",
+32 -12
View File
@@ -4,12 +4,17 @@
[
"tcreeper.earth@gmail.com",
"TCr3",
23
24
],
[
"muhaaliss@pm.me",
"Muha Aliss",
52
],
[
"libreajans@gmail.com",
"Sabri \u00dcnal",
70
]
]
},
@@ -27,7 +32,7 @@
[
"mr-isaac@ig.com.br",
"Isaac Dias",
77
93
]
]
},
@@ -88,12 +93,17 @@
[
"softexpert@gmail.com",
"SoftExpert",
126
127
]
]
},
{
"Ukrainian": [
[
"cakestwix1@gmail.com",
"CakesTwix",
36
],
[
"911us@duck.com",
"Petro S.",
@@ -174,14 +184,14 @@
{
"Polish": [
[
"sto@tutanota.de",
"WaldiS",
4
"gnu.ewm@protonmail.com",
"Eryk Michalak",
10
],
[
"gnu.ewm@protonmail.com",
"gnu-ewm",
10
"sto@tutanota.de",
"WaldiS",
39
],
[
"pwrzonca@gmail.com",
@@ -239,6 +249,11 @@
},
{
"Indonesian": [
[
"rezaalmanda27@gmail.com",
"Reza Almanda",
52
],
[
"randompsyduck@duck.com",
"Sir-Ivysaur",
@@ -248,6 +263,11 @@
},
{
"Dutch": [
[
"philip.goto@gmail.com",
"Philip Goto",
1
],
[
"code@simonschneegans.de",
"Simon Schneegans",
@@ -370,7 +390,7 @@
[
"darkcircle.0426@gmail.com",
"Seong-ho Cho",
92
129
]
]
},
@@ -379,7 +399,7 @@
[
"jose1711@gmail.com",
"Jose Riha",
73
129
]
]
},
@@ -403,7 +423,7 @@
[
"aerowolf@tom.com",
"aerowolf",
42
98
]
]
},
Binary file not shown.

After

Width:  |  Height:  |  Size: 955 KiB

+5 -5
View File
@@ -31,7 +31,7 @@ void main() {
float progress = uForOpening ? 1.0 - uProgress : uProgress;
// Draw the individual shard layers.
for (float i = 0; i < SHARD_LAYERS; ++i) {
for (float i = 0.0; i < SHARD_LAYERS; ++i) {
// To enable drawing shards outside of the window bounds, the actor was scaled
// by ACTOR_SCALE. Here we scale and move the texture coordinates so that the
@@ -51,8 +51,8 @@ void main() {
// Move down each layer a bit.
float gravity =
(uForOpening ? -1.0 : 1.0) * uGravity * 0.1 * (i + 1) * progress * progress;
coords += vec2(0, gravity);
(uForOpening ? -1.0 : 1.0) * uGravity * 0.1 * (i + 1.0) * progress * progress;
coords += vec2(0.0, gravity);
// Restore correct position.
coords += uEpicenter;
@@ -66,10 +66,10 @@ void main() {
// the bin of the current shard.
float shardGroup = floor(shardMap.g * SHARD_LAYERS * 0.999);
if (shardGroup == i && (shardMap.x - pow(progress + 0.1, 2)) > 0.0) {
if (shardGroup == i && (shardMap.x - pow(progress + 0.1, 2.0)) > 0.0) {
oColor = getInputColor(coords);
}
}
setOutputColor(oColor);
}
}
+1 -1
View File
@@ -99,7 +99,7 @@ uniform vec2 uSize;
uniform float uPadding;
// On GNOME, we set iTexCoord to be an alias for the cogl variables.
vec2 iTexCoord = cogl_tex_coord_in[0].st;
#define iTexCoord vec2(cogl_tex_coord_in[0])
// Shell.GLSLEffect uses straight alpha. So we have to convert from premultiplied.
vec4 getInputColor(vec2 coords) {
+4 -2
View File
@@ -107,12 +107,14 @@ void main() {
if ((!uForOpening && gradient > hideThreshold) ||
(uForOpening && gradient < hideThreshold)) {
// We add some distortion in the scorch zone
// We add some distortion in the scorch zone. This is only possible if using GLES.
vec2 distort = vec2(0.0);
#ifndef GL_ES
if (scorchRange.x < gradient && gradient < scorchRange.y) {
distort = vec2(dFdx(gradient), dFdy(gradient)) * scorchMask * 5.0;
}
#endif
oColor = getInputColor(iTexCoord + distort);
}
@@ -154,4 +156,4 @@ void main() {
}
setOutputColor(oColor);
}
}
+3 -3
View File
@@ -54,7 +54,7 @@ vec2 getRain(vec2 fragCoord) {
float delay = fract(sin(column) * 78.233) * mix(0.0, 1.0, uRandomness);
float speed = fract(cos(column) * 12.989) * mix(0.0, 0.3, uRandomness) + 1.5;
float distToDrop = (uProgress * 2 - delay) * speed - iTexCoord.y;
float distToDrop = (uProgress * 2.0 - delay) * speed - iTexCoord.y;
float rainAlpha = distToDrop >= 0.0 ? exp(-distToDrop / TRAIL_LENGTH) : 0.0;
float windowAlpha = 1.0 - clamp(uSize.y * distToDrop, 0.0, FADE_WIDTH) / FADE_WIDTH;
@@ -91,7 +91,7 @@ void main() {
// This is used to fade out the remaining trails in the end.
float finalFade =
1 -
1.0 -
clamp((uProgress - FINAL_FADE_START_TIME) / (1.0 - FINAL_FADE_START_TIME), 0.0, 1.0);
float rainAlpha = finalFade * rainMask.x;
@@ -106,4 +106,4 @@ void main() {
// oColor = vec4(vec3(rainMask.y), 1);
setOutputColor(oColor);
}
}
+62
View File
@@ -0,0 +1,62 @@
//////////////////////////////////////////////////////////////////////////////////////////
// ) ( //
// ( /( ( ( ) ( ( ( ( )\ ) ( ( //
// )\()) ))\ )( ( ( )\ ) )\))( )\ ( (()/( ( )\))( ( //
// ((_)\ /((_|()\ )\ ) )\ '(()/( ((_)()((_) )\ ) ((_)))\((_)()\ )\ //
// | |(_|_))( ((_)_(_/( _((_)) )(_)) _(()((_|_)_(_/( _| |((_)(()((_|(_) //
// | '_ \ || | '_| ' \)) | ' \()| || | \ V V / | ' \)) _` / _ \ V V (_-< //
// |_.__/\_,_|_| |_||_| |_|_|_| \_, | \_/\_/|_|_||_|\__,_\___/\_/\_//__/ //
// |__/ //
//////////////////////////////////////////////////////////////////////////////////////////
// SPDX-FileCopyrightText: Simon Schneegans <code@simonschneegans.de>
// SPDX-License-Identifier: GPL-3.0-or-later
// The content from common.glsl is automatically prepended to each shader effect.
// See assets/README.md for how this texture was created.
uniform sampler2D uBrushTexture;
uniform float uBrushSize;
const float SHADOW_WIDTH = 0.03;
const float SHADOW_STEPS = 10.0;
// Returns 1.0 if the window texture at the given texCoord should be painted.
float getMask(vec2 texCoord, float progress) {
float brush = texture2D(uBrushTexture, texCoord)[int(uBrushSize - 1.0)];
if (uForOpening) {
return step(brush, progress);
}
return step(progress, brush);
}
void main() {
vec4 oColor = getInputColor(iTexCoord.st);
// This will be 0.0 in the masked-out areas.
float mask = getMask(iTexCoord.st, uProgress);
// Add a simple drop shadow below the remaining parts.
if (mask == 0.0) {
for (float i = 0.0; i < SHADOW_STEPS; ++i) {
vec2 shadowTexCoord = iTexCoord.st - vec2(0.0, i * SHADOW_WIDTH / SHADOW_STEPS);
float shadowMask = getMask(shadowTexCoord, uProgress);
float shadowAlpha = (1.0 - i / SHADOW_STEPS) * shadowMask * getInputColor(shadowTexCoord).a;
if (shadowAlpha > 0.0) {
oColor = vec4(vec3(0.0), shadowAlpha * 0.2);
break;
}
// If we arrived at the end of the shadow, make sure to set the alpha to 0.
if (i == SHADOW_STEPS - 1.0) {
oColor.a = 0.0;
}
}
}
setOutputColor(oColor);
}
+18 -15
View File
@@ -29,19 +29,20 @@ const float WINDOW_TILT = -1.0;
// Make sure that the portal and window open / close animations are quick even if the
// duration is longer.
float PORTAL_OPEN_TIME = 0.4 / uDuration;
float PORTAL_CLOSE_TIME = 0.4 / uDuration;
float WINDOW_OPEN_TIME = 0.35 / uDuration;
float PORTAL_OPEN_TIME = 0.4;
float PORTAL_CLOSE_TIME = 0.4;
float WINDOW_OPEN_TIME = 0.35;
// This will distort the given coordinate to achieve the wobble effect of the portal when
// the window passes through. The wobble happens around the point where the window appears
// or disappears (which is controlled by WINDOW_OPEN_TIME) and takes
// PORTAL_WOBBLE_TIME.
vec2 getPortalWobble(vec2 coords) {
float progress = (uForOpening ? (1.0 - uProgress) : uProgress) / WINDOW_OPEN_TIME;
progress = clamp(1.0 - abs((progress - 1.0) / PORTAL_WOBBLE_TIME), 0.0, 1.0);
progress = easeInBack(progress, 1.7);
float dist = length(coords);
float progress =
(uForOpening ? (1.0 - uProgress) : uProgress) / WINDOW_OPEN_TIME * uDuration;
progress = clamp(1.0 - abs((progress - 1.0) / PORTAL_WOBBLE_TIME), 0.0, 1.0);
progress = easeInBack(progress, 1.7);
float dist = length(coords);
return coords * (1.0 - dist) * exp(-dist) * progress * PORTAL_WOBBLE_STRENGTH;
}
@@ -50,12 +51,13 @@ vec2 getPortalWobble(vec2 coords) {
// increase during uDuration*PORTAL_OPEN_TIME, stay at one until uDuration*(1.0 -
// PORTAL_CLOSE_TIME) and then decrease again.
float getPortalScale() {
float scale = 1.0;
if (uProgress < PORTAL_OPEN_TIME) {
scale = easeOutBack(uProgress / PORTAL_OPEN_TIME, 1.5);
} else if (uProgress > 1.0 - PORTAL_CLOSE_TIME) {
scale =
easeOutBack(1.0 - (uProgress - 1.0 + PORTAL_CLOSE_TIME) / PORTAL_CLOSE_TIME, 1.5);
float scale = 1.0;
float closeTime = PORTAL_CLOSE_TIME / uDuration;
float openTime = PORTAL_OPEN_TIME / uDuration;
if (uProgress < openTime) {
scale = easeOutBack(uProgress / openTime, 1.5);
} else if (uProgress > 1.0 - closeTime) {
scale = easeOutBack(1.0 - (uProgress - 1.0 + closeTime) / closeTime, 1.5);
}
return scale;
@@ -165,7 +167,8 @@ vec4 getPortalColor() {
// window). The fraction of the animation time take for the window animation is defined by
// WINDOW_OPEN_TIME.
vec4 getWindowColor() {
float progress = (uForOpening ? (1.0 - uProgress) : uProgress) / WINDOW_OPEN_TIME;
float progress =
(uForOpening ? (1.0 - uProgress) : uProgress) / WINDOW_OPEN_TIME * uDuration;
// Add some elastic easing to make the effect more dynamic.
progress = easeInBack(clamp(progress, 0.0, 1.0), 1.2);
@@ -203,4 +206,4 @@ void main() {
// These can be useful for understanding how this works.
// setOutputColor(portal);
// setOutputColor(window);
}
}
+3 -3
View File
@@ -37,7 +37,7 @@ void main() {
vec4 oColor = vec4(0.0);
for (float i = 0; i < DUST_LAYERS; ++i) {
for (float i = 0.0; i < DUST_LAYERS; ++i) {
// Create a random direction.
float factor = DUST_LAYERS == 1.0 ? 0.0 : i / (DUST_LAYERS - 1.0);
@@ -84,7 +84,7 @@ void main() {
windowColor.rgb = mix(windowColor.rgb, dustColor, progress);
// Dissolve and blend the layers.
if (dustMap.x - progress > 0) {
if (dustMap.x - progress > 0.0) {
oColor = windowColor;
}
}
@@ -94,4 +94,4 @@ void main() {
// oColor = vec4(progress, 0, 0, 0);
setOutputColor(oColor);
}
}
+17 -8
View File
@@ -23,9 +23,12 @@ uniform float uNumClaws;
uniform float uWarpIntensity;
const float FLASH_INTENSITY = 0.1;
const float MAX_SPAWN_TIME =
0.6; // Scratches will only start in the first half of the animation.
const float FF_TIME = 0.6; // Relative time for the final fade to transparency.
// Scratches will only start in the first half of the animation.
const float MAX_SPAWN_TIME = 0.6;
// Relative time for the final fade to transparency.
const float FF_TIME = 0.6;
// This method generates a grid of randomly rotated, slightly shifted and scaled
// UV squares. It returns the texture coords of the UV square at the given actor
@@ -82,15 +85,21 @@ void main() {
// relative time when the respective part will become invisible. Therefore we can
// add a value to make the scratch appear later.
float scratchMap = 1.0;
for (int i = 0; i < uNumClaws; ++i) {
vec2 uv = getClawUV(coords, 1.0 / uClawSize, uSeed * (i + 1));
for (float i = 0.0; i < uNumClaws; ++i) {
vec2 uv = getClawUV(coords, 1.0 / uClawSize, uSeed * (i + 1.0));
float delay = i / uNumClaws * MAX_SPAWN_TIME;
scratchMap = min(scratchMap, clamp(texture2D(uClawTexture, uv).r + delay, 0.0, 1.0));
}
// Get the window texture. We shift the texture lookup by the local derivative of
// the claw texture in order to mimic some folding distortion.
vec2 offset = vec2(dFdx(scratchMap), dFdy(scratchMap)) * progress * 0.5;
// the claw texture in order to mimic some folding distortion. This is only possible if
// not using GLES.
vec2 offset = vec2(0.0);
#ifndef GL_ES
offset = vec2(dFdx(scratchMap), dFdy(scratchMap)) * progress * 0.5;
#endif
vec4 oColor = getInputColor(coords + offset);
// Add colorful flashes.
@@ -118,4 +127,4 @@ void main() {
// oColor = vec4(vec3(scratchMap), 1);
setOutputColor(oColor);
}
}
+80
View File
@@ -0,0 +1,80 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
SPDX-FileCopyrightText: Simon Schneegans <code@simonschneegans.de>
SPDX-License-Identifier: GPL-3.0-or-later
-->
<interface domain="burn-my-windows">
<object class="AdwExpanderRow" id="paint-brush-prefs">
<child>
<object class="AdwActionRow">
<property name="title" translatable="yes">Animation Time [ms]</property>
<child>
<object class="GtkScale">
<property name="valign">center</property>
<property name="draw-value">1</property>
<property name="digits">0</property>
<property name="value-pos">left</property>
<property name="width-request">300</property>
<property name="adjustment">
<object class="GtkAdjustment" id="paint-brush-animation-time">
<property name="upper">10000</property>
<property name="lower">100</property>
<property name="step-increment">1</property>
<property name="page-increment">100</property>
</object>
</property>
</object>
</child>
<child>
<object class="GtkButton" id="reset-paint-brush-animation-time">
<property name="icon-name">edit-clear-symbolic</property>
<property name="valign">center</property>
<property name="tooltip-text" translatable="yes">Reset to Default Value</property>
<style>
<class name="flat" />
</style>
</object>
</child>
</object>
</child>
<child>
<object class="AdwActionRow">
<property name="title" translatable="yes">Brush Size</property>
<child>
<object class="GtkScale">
<property name="valign">center</property>
<property name="draw-value">1</property>
<property name="digits">0</property>
<property name="value-pos">left</property>
<property name="width-request">300</property>
<property name="adjustment">
<object class="GtkAdjustment" id="paint-brush-size">
<property name="upper">4</property>
<property name="lower">1</property>
<property name="step-increment">1</property>
<property name="page-increment">1</property>
</object>
</property>
</object>
</child>
<child>
<object class="GtkButton" id="reset-paint-brush-size">
<property name="icon-name">edit-clear-symbolic</property>
<property name="valign">center</property>
<property name="tooltip-text" translatable="yes">Reset to Default Value</property>
<style>
<class name="flat" />
</style>
</object>
</child>
</object>
</child>
</object>
</interface>
+1 -1
View File
@@ -5,7 +5,7 @@ SPDX-FileCopyrightText: Simon Schneegans <code@simonschneegans.de>
SPDX-License-Identifier: GPL-3.0-or-later
-->
<interface>
<interface domain="burn-my-windows">
<object class="AdwExpanderRow" id="snap-prefs">
+113
View File
@@ -0,0 +1,113 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
SPDX-FileCopyrightText: Simon Schneegans <code@simonschneegans.de>
SPDX-License-Identifier: GPL-3.0-or-later
-->
<interface domain="burn-my-windows">
<object class="GtkRevealer" id="paint-brush-prefs">
<child>
<object class="GtkListBox">
<property name="selection-mode">none</property>
<child>
<object class="GtkListBoxRow">
<property name="activatable">0</property>
<child>
<object class="GtkBox">
<child>
<object class="GtkLabel">
<property name="label" translatable="yes">Animation Time [ms]</property>
<property name="xalign">0</property>
<property name="halign">start</property>
<property name="valign">center</property>
<property name="hexpand">1</property>
</object>
</child>
<child>
<object class="GtkScale">
<property name="halign">end</property>
<property name="valign">center</property>
<property name="draw-value">1</property>
<property name="digits">0</property>
<property name="value-pos">left</property>
<property name="width-request">300</property>
<property name="adjustment">
<object class="GtkAdjustment" id="paint-brush-animation-time">
<property name="upper">10000</property>
<property name="lower">100</property>
<property name="step-increment">1</property>
<property name="page-increment">100</property>
</object>
</property>
</object>
</child>
<child>
<object class="GtkButton" id="reset-paint-brush-animation-time">
<property name="icon-name">edit-clear-symbolic</property>
<property name="tooltip-text" translatable="yes">Reset to Default Value</property>
<style>
<class name="flat" />
</style>
</object>
</child>
</object>
</child>
</object>
</child>
<child>
<object class="GtkListBoxRow">
<property name="activatable">0</property>
<child>
<object class="GtkBox">
<child>
<object class="GtkLabel">
<property name="label" translatable="yes">Brush Size</property>
<property name="xalign">0</property>
<property name="halign">start</property>
<property name="valign">center</property>
<property name="hexpand">1</property>
</object>
</child>
<child>
<object class="GtkScale">
<property name="halign">end</property>
<property name="valign">center</property>
<property name="draw-value">1</property>
<property name="digits">0</property>
<property name="value-pos">left</property>
<property name="width-request">300</property>
<property name="adjustment">
<object class="GtkAdjustment" id="paint-brush-size">
<property name="upper">4</property>
<property name="lower">1</property>
<property name="step-increment">1</property>
<property name="page-increment">1</property>
</object>
</property>
</object>
</child>
<child>
<object class="GtkButton" id="reset-paint-brush-size">
<property name="icon-name">edit-clear-symbolic</property>
<property name="tooltip-text" translatable="yes">Reset to Default Value</property>
<style>
<class name="flat" />
</style>
</object>
</child>
</object>
</child>
</object>
</child>
</object>
</child>
</object>
</interface>
+1 -1
View File
@@ -5,7 +5,7 @@ SPDX-FileCopyrightText: Simon Schneegans <code@simonschneegans.de>
SPDX-License-Identifier: GPL-3.0-or-later
-->
<interface>
<interface domain="burn-my-windows">
<object class="GtkRevealer" id="snap-prefs">