🎉 Improve fire appearance
This commit is contained in:
@@ -1,5 +1,14 @@
|
|||||||
# Changelog of the Burn-My-Windows Extension
|
# Changelog of the Burn-My-Windows Extension
|
||||||
|
|
||||||
|
## [Burn My Window 5](https://github.com/schneegans/Burn-My-Windows/releases/tag/v5)
|
||||||
|
|
||||||
|
**Release Date:** TBD
|
||||||
|
|
||||||
|
#### Other Enhancements
|
||||||
|
|
||||||
|
* The fire shader now uses a `smoothstep` to make it less blocky.
|
||||||
|
|
||||||
|
|
||||||
## [Burn My Window 4](https://github.com/schneegans/Burn-My-Windows/releases/tag/v4)
|
## [Burn My Window 4](https://github.com/schneegans/Burn-My-Windows/releases/tag/v4)
|
||||||
|
|
||||||
**Release Date:** 2021-12-25
|
**Release Date:** 2021-12-25
|
||||||
|
|||||||
@@ -111,10 +111,10 @@ var FireShader = GObject.registerClass({Properties: {}, Signals: {}},
|
|||||||
|
|
||||||
// Fade at window borders.
|
// Fade at window borders.
|
||||||
vec2 pos = cogl_tex_coord_in[0].st * vec2(uSizeX, uSizeY);
|
vec2 pos = cogl_tex_coord_in[0].st * vec2(uSizeX, uSizeY);
|
||||||
effectMask *= clamp(pos.x / edgeFadeWidth, 0, 1);
|
effectMask *= smoothstep(0, 1, clamp(pos.x / edgeFadeWidth, 0, 1));
|
||||||
effectMask *= clamp(pos.y / edgeFadeWidth, 0, 1);
|
effectMask *= smoothstep(0, 1, clamp(pos.y / edgeFadeWidth, 0, 1));
|
||||||
effectMask *= clamp((uSizeX - pos.x) / edgeFadeWidth, 0, 1);
|
effectMask *= smoothstep(0, 1, clamp((uSizeX - pos.x) / edgeFadeWidth, 0, 1));
|
||||||
effectMask *= clamp((uSizeY - pos.y) / edgeFadeWidth, 0, 1);
|
effectMask *= smoothstep(0, 1, clamp((uSizeY - pos.y) / edgeFadeWidth, 0, 1));
|
||||||
|
|
||||||
return vec2(windowMask, effectMask);
|
return vec2(windowMask, effectMask);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user