♻️ Use more consistent key names

This commit is contained in:
Simon Schneegans
2025-02-16 07:01:46 +01:00
parent 293fbf1d0f
commit 2a1e5f2b22
9 changed files with 94 additions and 91 deletions
+9 -9
View File
@@ -31,10 +31,10 @@
// vec4 getInputColor(vec2 coords)
// void setOutputColor(vec4 outColor)
uniform float uColorSpeed;
uniform bool uRandomColorOffset;
uniform float uColorOffset;
uniform float uColorSaturation;
uniform float uSpeed;
uniform bool uRandomColor;
uniform float uStartHue;
uniform float uSaturation;
uniform float uBlur;
uniform vec2 uSeed;
uniform float uEdgeSize;
@@ -72,8 +72,8 @@ void main() {
gradient += simplex2D((iTexCoord + uSeed)) * 0.5;
// This mask is used for the color overlay.
float glowMask = (progress - gradient) / mix(uEdgeSize, 0.5, progress);
glowMask = 1.0 - clamp(glowMask - progress, 0.0, 1.0);
float glowMask = (progress - gradient) / (uEdgeSize + 0.1);
glowMask = 1.0 - clamp(glowMask, 0.0, 1.0);
// Quickly fade out the glow mask at the end of the animation.
glowMask *= easeOutSine(min(1.0, (1.0 - progress) * 4.0));
@@ -90,10 +90,10 @@ void main() {
}
glowMask *= windowColor.a;
vec3 glowColor = cos(progress * uColorSpeed + uv.xyx + vec3(0, 2, 4)).xyz;
float colorOffset = (uRandomColorOffset) ? hash12(uSeed) : uColorOffset;
vec3 glowColor = cos(progress * uSpeed + uv.xyx + vec3(0, 2, 4)).xyz;
float colorOffset = (uRandomColor) ? hash12(uSeed) : uStartHue;
glowColor = offsetHue(glowColor, colorOffset + 0.1);
glowColor = clamp(glowColor * uColorSaturation, vec3(0.0), vec3(1.0));
glowColor = clamp(glowColor * uSaturation, vec3(0.0), vec3(1.0));
windowColor.rgb += glowColor * glowMask;
+14 -12
View File
@@ -31,13 +31,13 @@
// void setOutputColor(vec4 outColor)
// window time ... how we split the time between the window and the sparkle/star
uniform float uWT;
uniform float uXpos; // the Xposition of the star
uniform float uYpos; // the Yposition of the star
uniform float uSparkleRot; // the rotation of the star
uniform float uSparkleSize; // the size of the star
uniform bool uWinRot; // window rotation... but it's more of a warp
uniform vec2 uSeed; // and random numbers
uniform float uAnimationSplit;
uniform float uHorizontalSparklePosition; // the Xposition of the star
uniform float uVerticalSparklePosition; // the Yposition of the star
uniform float uSparkleRot; // the rotation of the star
uniform float uSparkleSize; // the size of the star
uniform bool uWindowRotation; // window rotation... but it's more of a warp
uniform vec2 uSeed; // and random numbers
// Used to scale the window.
vec2 scaleUV(vec2 uv, vec2 scale, vec2 centerOffset) {
@@ -106,16 +106,18 @@ void main() {
float progress = uForOpening ? 1.0 - uProgress : uProgress;
// Scale progress ... the first half of the animation.
float scalep = remap(progress, 0.0, uWT + 0.1, 0.0, 1.0);
float scalep = remap(progress, 0.0, uAnimationSplit + 0.1, 0.0, 1.0);
scalep = easeOutQuad(scalep);
// Sparkle progress ... the second half of the animation.
float sparkp = remap(progress, uWT - 0.1, 1.0, 0.0, 1.0);
float sparkp = remap(progress, uAnimationSplit - 0.1, 1.0, 0.0, 1.0);
sparkp = easeInOutSine(sparkp);
// This is the offset of the window... don't let them go too far each way.
vec2 offset = vec2(uXpos, uYpos * -1.0) * 0.20;
vec2 scaleOffset = mix(vec2(0.0), vec2(uXpos, uYpos * -1.0) * 0.50, scalep);
vec2 offset = vec2(uHorizontalSparklePosition, uVerticalSparklePosition * -1.0) * 0.20;
vec2 scaleOffset =
mix(vec2(0.0),
vec2(uHorizontalSparklePosition, uVerticalSparklePosition * -1.0) * 0.50, scalep);
// the UV for this function
float aspect = uSize.x / uSize.y;
@@ -129,7 +131,7 @@ void main() {
// Rotation and if we are gonna rotate or not.
vec3 rot = vec3(0.0);
if (uWinRot) {
if (uWindowRotation) {
rot = hash32(uSeed);
rot *= 2.0;
rot -= 1.0;
+10 -10
View File
@@ -66,17 +66,17 @@ SPDX-License-Identifier: GPL-3.0-or-later
<child>
<object class="AdwActionRow" id="aura-glow-action-row">
<property name="title" translatable="yes">Start Color Hue</property>
<property name="title" translatable="yes">Start Hue</property>
<child>
<object class="GtkScale" id="aura-glow-color-offset-scale">
<object class="GtkScale" id="aura-glow-start-hue-slider">
<property name="valign">center</property>
<property name="draw-value">1</property>
<property name="digits">2</property>
<property name="value-pos">left</property>
<property name="width-request">300</property>
<property name="adjustment">
<object class="GtkAdjustment" id="aura-glow-color-offset">
<object class="GtkAdjustment" id="aura-glow-start-hue">
<property name="upper">1.0</property>
<property name="lower">0.0</property>
<property name="step-increment">0.1</property>
@@ -86,7 +86,7 @@ SPDX-License-Identifier: GPL-3.0-or-later
</object>
</child>
<child>
<object class="GtkButton" id="reset-aura-glow-color-offset">
<object class="GtkButton" id="reset-aura-glow-start-hue">
<property name="icon-name">edit-clear-symbolic</property>
<property name="valign">center</property>
<property name="tooltip-text" translatable="yes">Reset to Default Value</property>
@@ -100,7 +100,7 @@ SPDX-License-Identifier: GPL-3.0-or-later
<child>
<object class="AdwActionRow">
<property name="title" translatable="yes">Color Speed</property>
<property name="title" translatable="yes">Speed</property>
<child>
<object class="GtkScale">
<property name="valign">center</property>
@@ -109,7 +109,7 @@ SPDX-License-Identifier: GPL-3.0-or-later
<property name="value-pos">left</property>
<property name="width-request">300</property>
<property name="adjustment">
<object class="GtkAdjustment" id="aura-glow-color-speed">
<object class="GtkAdjustment" id="aura-glow-speed">
<property name="upper">5.0</property>
<property name="lower">-5.0</property>
<property name="step-increment">0.25</property>
@@ -119,7 +119,7 @@ SPDX-License-Identifier: GPL-3.0-or-later
</object>
</child>
<child>
<object class="GtkButton" id="reset-aura-glow-color-speed">
<object class="GtkButton" id="reset-aura-glow-speed">
<property name="icon-name">edit-clear-symbolic</property>
<property name="valign">center</property>
<property name="tooltip-text" translatable="yes">Reset to Default Value</property>
@@ -133,7 +133,7 @@ SPDX-License-Identifier: GPL-3.0-or-later
<child>
<object class="AdwActionRow">
<property name="title" translatable="yes">Color Saturation</property>
<property name="title" translatable="yes">Saturation</property>
<child>
<object class="GtkScale">
<property name="valign">center</property>
@@ -142,7 +142,7 @@ SPDX-License-Identifier: GPL-3.0-or-later
<property name="value-pos">left</property>
<property name="width-request">300</property>
<property name="adjustment">
<object class="GtkAdjustment" id="aura-glow-color-saturation">
<object class="GtkAdjustment" id="aura-glow-saturation">
<property name="upper">1.0</property>
<property name="lower">0.0</property>
<property name="step-increment">0.10</property>
@@ -152,7 +152,7 @@ SPDX-License-Identifier: GPL-3.0-or-later
</object>
</child>
<child>
<object class="GtkButton" id="reset-aura-glow-color-saturation">
<object class="GtkButton" id="reset-aura-glow-saturation">
<property name="icon-name">edit-clear-symbolic</property>
<property name="valign">center</property>
<property name="tooltip-text" translatable="yes">Reset to Default Value</property>
+9 -11
View File
@@ -63,7 +63,7 @@ SPDX-License-Identifier: GPL-3.0-or-later
<property name="width-request">300</property>
<property name="adjustment">
<object class="GtkAdjustment" id="team-rocket-window-time">
<object class="GtkAdjustment" id="team-rocket-animation-split">
<property name="upper">0.8</property>
<property name="lower">0.2</property>
<property name="step-increment">0.01</property>
@@ -74,7 +74,7 @@ SPDX-License-Identifier: GPL-3.0-or-later
</child>
<child>
<object class="GtkButton" id="reset-team-rocket-window-time">
<object class="GtkButton" id="reset-team-rocket-animation-split">
<property name="icon-name">edit-clear-symbolic</property>
<property name="valign">center</property>
<property name="tooltip-text" translatable="yes">Reset to Default Value</property>
@@ -89,14 +89,14 @@ SPDX-License-Identifier: GPL-3.0-or-later
<child>
<object class="AdwActionRow">
<property name="title" translatable="yes">Rotate Window</property>
<property name="activatable-widget">team-rocket-win-rot</property>
<property name="activatable-widget">team-rocket-window-rotation</property>
<child>
<object class="GtkSwitch" id="team-rocket-win-rot">
<object class="GtkSwitch" id="team-rocket-window-rotation">
<property name="valign">center</property>
</object>
</child>
<child>
<object class="GtkButton" id="reset-team-rocket-win-rot">
<object class="GtkButton" id="reset-team-rocket-window-rotation">
<property name="icon-name">edit-clear-symbolic</property>
<property name="valign">center</property>
<property name="tooltip-text" translatable="yes">Reset to Default Value</property>
@@ -122,7 +122,7 @@ SPDX-License-Identifier: GPL-3.0-or-later
<property name="width-request">300</property>
<property name="adjustment">
<object class="GtkAdjustment" id="team-rocket-x">
<object class="GtkAdjustment" id="team-rocket-horizontal-sparkle-position">
<property name="upper">1.0</property>
<property name="lower">-1.0</property>
<property name="step-increment">0.01</property>
@@ -133,7 +133,7 @@ SPDX-License-Identifier: GPL-3.0-or-later
</child>
<child>
<object class="GtkButton" id="reset-team-rocket-x">
<object class="GtkButton" id="reset-team-rocket-horizontal-sparkle-position">
<property name="icon-name">edit-clear-symbolic</property>
<property name="valign">center</property>
<property name="tooltip-text" translatable="yes">Reset to Default Value</property>
@@ -159,7 +159,7 @@ SPDX-License-Identifier: GPL-3.0-or-later
<property name="width-request">300</property>
<property name="adjustment">
<object class="GtkAdjustment" id="team-rocket-y">
<object class="GtkAdjustment" id="team-rocket-vertical-sparkle-position">
<property name="upper">1.0</property>
<property name="lower">-1.0</property>
<property name="step-increment">0.01</property>
@@ -170,7 +170,7 @@ SPDX-License-Identifier: GPL-3.0-or-later
</child>
<child>
<object class="GtkButton" id="reset-team-rocket-y">
<object class="GtkButton" id="reset-team-rocket-vertical-sparkle-position">
<property name="icon-name">edit-clear-symbolic</property>
<property name="valign">center</property>
<property name="tooltip-text" translatable="yes">Reset to Default Value</property>
@@ -187,7 +187,6 @@ SPDX-License-Identifier: GPL-3.0-or-later
<object class="AdwActionRow">
<property name="title" translatable="yes">Sparkle Size</property>
<!-- <property name="subtitle" translatable="yes"></property> -->
<child>
<object class="GtkScale">
@@ -225,7 +224,6 @@ SPDX-License-Identifier: GPL-3.0-or-later
<object class="AdwActionRow">
<property name="title" translatable="yes">Sparkle Rotation</property>
<!-- <property name="subtitle" translatable="yes"></property> -->
<child>
<object class="GtkScale">