niri: add custom animations for window opening and resizing
Signed-off-by: faukah <fau@faukah.com> Change-Id: I6a6a69647336104b507fbba5b82de23684e60291
This commit is contained in:
parent
e4dc42c2f9
commit
b37855a6b2
4 changed files with 75 additions and 10 deletions
25
modules/wms/niri/window-open.glsl
Normal file
25
modules/wms/niri/window-open.glsl
Normal file
|
@ -0,0 +1,25 @@
|
|||
vec4 expanding_circle(vec3 coords_geo, vec3 size_geo) {
|
||||
vec3 coords_tex = niri_geo_to_tex * coords_geo;
|
||||
vec4 color = texture2D(niri_tex, coords_tex.st);
|
||||
vec2 coords = (coords_geo.xy - vec2(0.5, 0.5)) * size_geo.xy * 2.0;
|
||||
coords = coords / length(size_geo.xy);
|
||||
float p = niri_clamped_progress;
|
||||
if (p * p <= dot(coords, coords))
|
||||
color = vec4(0.0);
|
||||
|
||||
return color;
|
||||
}
|
||||
|
||||
vec4 slider(vec3 coords_geo, vec3 size_geo) {
|
||||
vec3 coords_tex = niri_geo_to_tex * coords_geo;
|
||||
vec4 color = texture2D(niri_tex, coords_tex.st);
|
||||
|
||||
if(coords_geo.x >= niri_clamped_progress) {
|
||||
color = vec4(0.0);
|
||||
}
|
||||
return color;
|
||||
}
|
||||
|
||||
vec4 open_color(vec3 coords_geo, vec3 size_geo) {
|
||||
return slider(coords_geo, size_geo);
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue