Compare commits
16 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| aeec220a5e | |||
| 17fae262c5 | |||
| a331736eb3 | |||
| c439727ddd | |||
| 2b073d34bd | |||
| 15b0237e54 | |||
| 466d449dc4 | |||
| f92b8d058a | |||
| 0a9e04ce09 | |||
| 022fc8f77e | |||
| 820b3f75ea | |||
| d5f20f32ca | |||
| 2ffb9c9717 | |||
| 719540d020 | |||
| e479b86664 | |||
| 6b68fd6715 |
+1064
File diff suppressed because it is too large
Load Diff
|
After Width: | Height: | Size: 30 KiB |
+23
-1
@@ -1,8 +1,30 @@
|
||||
# Changelog of the Burn-My-Windows Extension
|
||||
|
||||
## [Burn My Window 7](https://github.com/schneegans/Burn-My-Windows/releases/tag/v7)
|
||||
|
||||
**Release Date:** 2022-01-03
|
||||
|
||||
#### New Features
|
||||
|
||||
* Add the option to use a 3D noise for the fire shader. This will add some more temporal variation to the flames at the cost of slightly decreased rendering performance.
|
||||
* Added a changelog entry to the menu of the preferences dialog.
|
||||
|
||||
#### Fixes
|
||||
|
||||
* Resolve copyright issues by using a MIT-licensed noise implementation.
|
||||
|
||||
|
||||
## [Burn My Window 6](https://github.com/schneegans/Burn-My-Windows/releases/tag/v6)
|
||||
|
||||
**Release Date:** 2022-01-02
|
||||
|
||||
#### Fixes
|
||||
|
||||
* Removed a debug log message.
|
||||
|
||||
## [Burn My Window 5](https://github.com/schneegans/Burn-My-Windows/releases/tag/v5)
|
||||
|
||||
**Release Date:** TBD
|
||||
**Release Date:** 2022-01-02
|
||||
|
||||
#### New Features
|
||||
|
||||
|
||||
@@ -112,7 +112,6 @@ class Extension {
|
||||
// https://gitlab.gnome.org/GNOME/gnome-shell/-/blob/main/js/ui/workspace.js#L1178
|
||||
Workspace.prototype._doRemoveWindow = function(metaWin) {
|
||||
if (extensionThis._shouldDestroy(this, metaWin)) {
|
||||
utils.debug((new Error()).stack);
|
||||
extensionThis._origDoRemoveWindow.apply(this, [metaWin]);
|
||||
}
|
||||
};
|
||||
|
||||
+1
-1
@@ -11,5 +11,5 @@
|
||||
"41"
|
||||
],
|
||||
"url": "https://github.com/Schneegans/Burn-My-Windows",
|
||||
"version": 5
|
||||
"version": 7
|
||||
}
|
||||
@@ -48,6 +48,7 @@ var PreferencesDialog = class PreferencesDialog {
|
||||
this._bindSwitch('destroy-dialogs');
|
||||
this._bindAdjustment('flame-movement-speed');
|
||||
this._bindAdjustment('flame-scale');
|
||||
this._bindSwitch('flame-3d-noise');
|
||||
this._bindColorButton('fire-color-1');
|
||||
this._bindColorButton('fire-color-2');
|
||||
this._bindColorButton('fire-color-3');
|
||||
@@ -96,6 +97,9 @@ var PreferencesDialog = class PreferencesDialog {
|
||||
};
|
||||
|
||||
addAction('homepage', 'https://github.com/Schneegans/Burn-My-Windows');
|
||||
addAction(
|
||||
'changelog',
|
||||
'https://github.com/Schneegans/Burn-My-Windows/blob/main/docs/changelog.md');
|
||||
addAction('bugs', 'https://github.com/Schneegans/Burn-My-Windows/issues');
|
||||
addAction(
|
||||
'donate-paypal',
|
||||
|
||||
@@ -25,6 +25,10 @@
|
||||
<attribute name="label" translatable="yes">Visit Homepage</attribute>
|
||||
<attribute name="action">prefs.homepage</attribute>
|
||||
</item>
|
||||
<item>
|
||||
<attribute name="label" translatable="yes">View Changelog</attribute>
|
||||
<attribute name="action">prefs.changelog</attribute>
|
||||
</item>
|
||||
<item>
|
||||
<attribute name="label" translatable="yes">Report a Bug</attribute>
|
||||
<attribute name="action">prefs.bugs</attribute>
|
||||
@@ -422,6 +426,70 @@
|
||||
</object>
|
||||
</child>
|
||||
|
||||
<child>
|
||||
<object class="GtkListBoxRow">
|
||||
<property name="margin-start">10</property>
|
||||
<property name="margin-end">10</property>
|
||||
<property name="margin-top">10</property>
|
||||
<property name="margin-bottom">10</property>
|
||||
<property name="activatable">0</property>
|
||||
<property name="activatable">0</property>
|
||||
<child>
|
||||
<object class="GtkBox">
|
||||
<property name="spacing">8</property>
|
||||
<child>
|
||||
<object class="GtkBox">
|
||||
<property name="orientation">vertical</property>
|
||||
<property name="spacing">3</property>
|
||||
<child>
|
||||
<object class="GtkLabel">
|
||||
<property name="label" translatable="yes">3D Noise</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="GtkLabel">
|
||||
<property name="label" translatable="yes">Creates a more dynamic fire but requires more GPU power.</property>
|
||||
<property name="xalign">0</property>
|
||||
<property name="halign">start</property>
|
||||
<property name="valign">center</property>
|
||||
<property name="hexpand">1</property>
|
||||
<style>
|
||||
<class name="dim-label" />
|
||||
<class name="caption" />
|
||||
</style>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkSwitch" id="flame-3d-noise">
|
||||
<property name="halign">end</property>
|
||||
<property name="valign">center</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkButton" id="reset-flame-3d-noise">
|
||||
<child>
|
||||
<object class="GtkImage">
|
||||
<property name="icon-name">edit-clear-symbolic</property>
|
||||
<property name="icon-size">1</property>
|
||||
</object>
|
||||
</child>
|
||||
<property name="tooltip-text">Reset to Default Value</property>
|
||||
<style>
|
||||
<class name="flat" />
|
||||
</style>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
|
||||
<child>
|
||||
<object class="GtkListBoxRow">
|
||||
<property name="margin-start">10</property>
|
||||
|
||||
@@ -33,6 +33,10 @@
|
||||
<attribute name="label" translatable="yes">Visit Homepage</attribute>
|
||||
<attribute name="action">prefs.homepage</attribute>
|
||||
</item>
|
||||
<item>
|
||||
<attribute name="label" translatable="yes">View Changelog</attribute>
|
||||
<attribute name="action">prefs.changelog</attribute>
|
||||
</item>
|
||||
<item>
|
||||
<attribute name="label" translatable="yes">Report a Bug</attribute>
|
||||
<attribute name="action">prefs.bugs</attribute>
|
||||
@@ -351,6 +355,59 @@
|
||||
</object>
|
||||
</child>
|
||||
|
||||
<child>
|
||||
<object class="GtkListBoxRow">
|
||||
<property name="activatable">0</property>
|
||||
<child>
|
||||
<object class="GtkBox">
|
||||
<child>
|
||||
<object class="GtkBox">
|
||||
<property name="orientation">vertical</property>
|
||||
<property name="spacing">3</property>
|
||||
<child>
|
||||
<object class="GtkLabel">
|
||||
<property name="label" translatable="yes">3D Noise</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="GtkLabel">
|
||||
<property name="label" translatable="yes">Creates a more dynamic fire but requires more GPU power.</property>
|
||||
<property name="xalign">0</property>
|
||||
<property name="halign">start</property>
|
||||
<property name="valign">center</property>
|
||||
<property name="hexpand">1</property>
|
||||
<style>
|
||||
<class name="dim-label" />
|
||||
<class name="caption" />
|
||||
</style>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkSwitch" id="flame-3d-noise">
|
||||
<property name="halign">end</property>
|
||||
<property name="valign">center</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkButton" id="reset-flame-3d-noise">
|
||||
<property name="icon-name">edit-clear-symbolic</property>
|
||||
<property name="tooltip-text">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>
|
||||
|
||||
@@ -41,6 +41,12 @@
|
||||
<description>The size of the flames.</description>
|
||||
</key>
|
||||
|
||||
<key name="flame-3d-noise" type="b">
|
||||
<default>false</default>
|
||||
<summary>Flame 3D Noise</summary>
|
||||
<description>Use a 3D noise for the flames.</description>
|
||||
</key>
|
||||
|
||||
<key name="fire-color-1" type="s">
|
||||
<default>"rgba(76, 51, 25, 0.0)"</default>
|
||||
<summary>Fire Color 1</summary>
|
||||
|
||||
@@ -49,7 +49,7 @@ var FireShader = GObject.registerClass({Properties: {}, Signals: {}},
|
||||
${shaderSnippets.noise()}
|
||||
|
||||
// These may be configurable in the future.
|
||||
const float EDGE_FADE = 70;
|
||||
const float EDGE_FADE = 90;
|
||||
const float FADE_WIDTH = 0.1;
|
||||
const float HIDE_TIME = 0.4;
|
||||
const vec2 FIRE_SCALE = vec2(400, 600) * ${settings.get_double('flame-scale')};
|
||||
@@ -124,7 +124,12 @@ var FireShader = GObject.registerClass({Properties: {}, Signals: {}},
|
||||
// Get a noise value which moves vertically in time.
|
||||
vec2 uv = cogl_tex_coord_in[0].st * vec2(uSizeX, uSizeY) / FIRE_SCALE;
|
||||
uv.y += uTime * FIRE_SPEED;
|
||||
float noise = perlinNoise(uv, 10.0, 5, 0.5);
|
||||
|
||||
#if ${settings.get_boolean('flame-3d-noise') ? 1 : 0}
|
||||
float noise = noise3D(vec3(uv*7.5, uTime*FIRE_SPEED*3.0), 5);
|
||||
#else
|
||||
float noise = noise2D(uv * 7.5, 5);
|
||||
#endif
|
||||
|
||||
// Modulate noise by effect mask.
|
||||
vec2 effectMask = effectMask(HIDE_TIME, FADE_WIDTH, EDGE_FADE);
|
||||
|
||||
@@ -46,7 +46,9 @@ var MatrixShader = GObject.registerClass({Properties: {}, Signals: {}},
|
||||
const tipColor =
|
||||
Clutter.Color.from_string(settings.get_string('matrix-tip-color'))[1];
|
||||
|
||||
// This is partially based on https://www.shadertoy.com/view/ldccW4 (CC-BY-NC-SA).
|
||||
// The technique for this effect was inspired by
|
||||
// https://www.shadertoy.com/view/ldccW4, however the implementation is quite
|
||||
// different as the letters drop only once and there is no need for a noise texture.
|
||||
this.set_shader_source(`
|
||||
|
||||
// Inject some common shader snippets.
|
||||
@@ -72,7 +74,7 @@ var MatrixShader = GObject.registerClass({Properties: {}, Signals: {}},
|
||||
vec2 block = pixelCoords/LETTER_SIZE - uv;
|
||||
|
||||
// Choose random letter.
|
||||
uv += floor(rand2(floor(rand(block)*vec2(12.9898,78.233) + LETTER_FLICKER_SPEED*uTime + 42.254))*LETTER_TILES);
|
||||
uv += floor(hash2D(floor(hash2D(block)*vec2(12.9898,78.233) + LETTER_FLICKER_SPEED*uTime + 42.254))*LETTER_TILES);
|
||||
|
||||
return texture2D(uFontTexture, uv/LETTER_TILES).r;
|
||||
}
|
||||
|
||||
@@ -65,7 +65,7 @@ var TRexShader = GObject.registerClass({Properties: {}, Signals: {}},
|
||||
vec2 getClawUV(vec2 texCoords, float gridScale, vec2 seed) {
|
||||
|
||||
// Shift coordinates by a random offset and make sure the have a 1:1 aspect ratio.
|
||||
vec2 coords = texCoords + rand2(seed);
|
||||
vec2 coords = texCoords + hash2D(seed);
|
||||
coords *= uSizeX < uSizeY ? vec2(1.0, 1.0 * uSizeY / uSizeX) : vec2(1.0 * uSizeX / uSizeY, 1.0);
|
||||
|
||||
// Apply global scale.
|
||||
@@ -78,10 +78,10 @@ var TRexShader = GObject.registerClass({Properties: {}, Signals: {}},
|
||||
vec2 cellID = coords-cellUV + vec2(362.456);
|
||||
|
||||
// Add random rotation, scale and offset to each grid cell.
|
||||
float scale = mix(0.8, 1.0, rand(cellID*seed*134.451));
|
||||
float offsetX = mix(0.0, 1.0 - scale, rand(cellID*seed*54.4129));
|
||||
float offsetY = mix(0.0, 1.0 - scale, rand(cellID*seed*25.3089));
|
||||
float rotation = mix(0.0, 2.0 * 3.141, rand(cellID*seed*2.99837));
|
||||
float scale = mix(0.8, 1.0, hash(cellID*seed*134.451));
|
||||
float offsetX = mix(0.0, 1.0 - scale, hash(cellID*seed*54.4129));
|
||||
float offsetY = mix(0.0, 1.0 - scale, hash(cellID*seed*25.3089));
|
||||
float rotation = mix(0.0, 2.0 * 3.141, hash(cellID*seed*2.99837));
|
||||
|
||||
cellUV -= vec2(offsetX, offsetY);
|
||||
cellUV /= scale;
|
||||
|
||||
@@ -33,51 +33,93 @@ function standardUniforms() {
|
||||
`;
|
||||
}
|
||||
|
||||
// The noise implementation is from https://www.shadertoy.com/view/3tcBzH (CC-BY-NC-SA).
|
||||
// These noise algorithms are based on implementations by Inigo Quilez which are
|
||||
// available under the MIT License.
|
||||
// https://www.shadertoy.com/view/lsf3WH
|
||||
// https://www.shadertoy.com/view/4sfGzS
|
||||
// https://www.shadertoy.com/view/Xsl3Dl
|
||||
// https://www.shadertoy.com/view/Msf3WH
|
||||
function noise() {
|
||||
return `
|
||||
float rand(vec2 co) {
|
||||
return fract(sin(dot(co.xy, vec2(12.9898,78.233))) * 43758.5453);
|
||||
|
||||
vec2 hash2D(vec2 p) {
|
||||
p = vec2(dot(p, vec2(127.1, 311.7)), dot(p, vec2(269.5, 183.3)));
|
||||
return fract(sin(p) * 43758.5453123);
|
||||
}
|
||||
|
||||
vec2 rand2(vec2 co) {
|
||||
return vec2(rand(co), rand(co + vec2(12.9898,78.233)));
|
||||
vec3 hash3D(vec3 p) {
|
||||
p = vec3(dot(p, vec3(127.1, 311.7, 74.7)),
|
||||
dot(p, vec3(269.5, 183.3, 246.1)),
|
||||
dot(p, vec3(113.5, 271.9, 124.6)));
|
||||
|
||||
return fract(sin(p) * 43758.5453123);
|
||||
}
|
||||
|
||||
float hermite(float t) {
|
||||
return t * t * (3.0 - 2.0 * t);
|
||||
float hash(vec2 p) {
|
||||
p = floor(p);
|
||||
p = 50.0 * fract(p * 0.3183099 + vec2(0.71, 0.113));
|
||||
return fract(p.x * p.y * (p.x + p.y));
|
||||
}
|
||||
|
||||
float noiseImpl(vec2 co, float frequency) {
|
||||
vec2 v = vec2(co.x * frequency, co.y * frequency);
|
||||
|
||||
float ix1 = floor(v.x);
|
||||
float iy1 = floor(v.y);
|
||||
float ix2 = floor(v.x + 1.0);
|
||||
float iy2 = floor(v.y + 1.0);
|
||||
|
||||
float fx = hermite(fract(v.x));
|
||||
float fy = hermite(fract(v.y));
|
||||
|
||||
float fade1 = mix(rand(vec2(ix1, iy1)), rand(vec2(ix2, iy1)), fx);
|
||||
float fade2 = mix(rand(vec2(ix1, iy2)), rand(vec2(ix2, iy2)), fx);
|
||||
|
||||
return mix(fade1, fade2, fy);
|
||||
float hash(vec3 p) {
|
||||
p = fract(p * 0.3183099 + 0.1) * 17.0;
|
||||
return fract(p.x * p.y * p.z * (p.x + p.y + p.z));
|
||||
}
|
||||
|
||||
float perlinNoise(vec2 co, float freq, int steps, float persistence) {
|
||||
float value = 0.0;
|
||||
float ampl = 1.0;
|
||||
float sum = 0.0;
|
||||
float noise2D(vec2 p) {
|
||||
vec2 i = floor(p);
|
||||
vec2 f = fract(p);
|
||||
|
||||
vec2 u = f * f * (3.0 - 2.0 * f);
|
||||
|
||||
for(int i=0 ; i<steps ; i++) {
|
||||
sum += ampl;
|
||||
value += noiseImpl(co, freq) * ampl;
|
||||
freq *= 2.0;
|
||||
ampl *= persistence;
|
||||
return mix(mix(hash(i + vec2(0.0, 0.0)),
|
||||
hash(i + vec2(1.0, 0.0)), u.x),
|
||||
mix(hash(i + vec2(0.0, 1.0)),
|
||||
hash(i + vec2(1.0, 1.0)), u.x), u.y);
|
||||
}
|
||||
|
||||
float noise3D(vec3 p) {
|
||||
vec3 i = floor(p);
|
||||
vec3 f = fract(p);
|
||||
|
||||
f = f * f * (3.0 - 2.0 * f);
|
||||
|
||||
return mix(mix(mix(hash(i+vec3(0, 0 ,0)),
|
||||
hash(i+vec3(1, 0 ,0)), f.x),
|
||||
mix(hash(i+vec3(0, 1 ,0)),
|
||||
hash(i+vec3(1, 1 ,0)), f.x), f.y),
|
||||
mix(mix(hash(i+vec3(0, 0 ,1)),
|
||||
hash(i+vec3(1, 0 ,1)), f.x),
|
||||
mix(hash(i+vec3(0, 1 ,1)),
|
||||
hash(i+vec3(1, 1 ,1)), f.x),f.y), f.z);
|
||||
}
|
||||
|
||||
float noise2D(vec2 p, int octaves) {
|
||||
mat2 m = mat2( 1.6, 1.2,
|
||||
-1.2, 1.6);
|
||||
|
||||
float f = 0;
|
||||
|
||||
for (int i=1; i<=octaves; ++i) {
|
||||
f += noise2D(p) / pow(2, i);
|
||||
p = m * p;
|
||||
}
|
||||
|
||||
return f;
|
||||
}
|
||||
|
||||
return value / sum;
|
||||
float noise3D(vec3 p, int octaves) {
|
||||
const mat3 m = mat3( 0.00, 0.80, 0.60,
|
||||
-0.80, 0.36, -0.48,
|
||||
-0.60, -0.48, 0.64);
|
||||
float f = 0;
|
||||
|
||||
for (int i=1; i<=octaves; ++i) {
|
||||
f += noise3D(p) / pow(2, i);
|
||||
p = m * p * 2.01;
|
||||
}
|
||||
|
||||
return f;
|
||||
}
|
||||
`;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user