3 Commits

Author SHA1 Message Date
bl 2c9130a90b Apply Patch 2026-08-08 22:43:23 +02:00
bl beb64f4df9 add fuzzy clouds shader 2026-06-15 22:56:47 +02:00
bl 2a99d35797 remember to cleanup when building 2026-06-09 15:22:23 +02:00
3 changed files with 41 additions and 1 deletions
+1
View File
@@ -122,6 +122,7 @@ jobs:
echo " User aur" >> ~/.ssh/config echo " User aur" >> ~/.ssh/config
ssh-keyscan aur.archlinux.org >> ~/.ssh/known_hosts 2>/dev/null ssh-keyscan aur.archlinux.org >> ~/.ssh/known_hosts 2>/dev/null
rm -rf /tmp/aur-gpupaper
git clone ssh://aur@aur.archlinux.org/gpupaper.git /tmp/aur-gpupaper git clone ssh://aur@aur.archlinux.org/gpupaper.git /tmp/aur-gpupaper
cp aur/PKGBUILD /tmp/aur-gpupaper/ cp aur/PKGBUILD /tmp/aur-gpupaper/
cd /tmp/aur-gpupaper cd /tmp/aur-gpupaper
+29
View File
@@ -0,0 +1,29 @@
// i don't remember what i based this off of or if it was just fiddling,
// found it in my shader list and thought the clouds were pretty good,
// for what it is
uniform float time;
uniform vec2 resolution;
float noise(vec3 p) {
float v = 0.0, a;
for (a = .85; a > .15; a *=.75) {
v += a * abs(dot( sin( .1*time + .1*p.z + .1*p/a) , vec3(a*3.)) );
p += p;
}
return v;
}
void mainImage(out vec4 o, vec2 u) {
float i = 0.0, s = 0.0;
o = vec4(0.0);
vec3 p = vec3(0.0);
vec2 r = resolution;
u = ( u+u - r.xy ) / r.y;
for( ; i++ < 1e2; ) {
p += vec3(u * s, s);
s = .1 + .2* abs( 12.-abs(p.y) - noise(p) );
o += 1./s;
}
o = tanh(vec4(5,2,1,0)*o /3e3/ length(u));
}
+11 -1
View File
@@ -243,11 +243,21 @@ impl SurfaceRenderer {
fps: u32, fps: u32,
) -> Result<Self> { ) -> Result<Self> {
let caps = surface.get_capabilities(&gpu.adapter); let caps = surface.get_capabilities(&gpu.adapter);
// A surface may advertise formats that need features we never requested when
// creating the device (see `required_features` above). Picking one of those
// fails validation at `create_render_pipeline`. Turnip/Adreno enumerates
// 16-bit-norm formats (needing TEXTURE_FORMAT_16BIT_NORM) before the plain
// 8-bit ones, so filter by what the device actually supports rather than
// relying on enumeration order.
let supported = gpu.device.features();
let usable = |f: &wgpu::TextureFormat| supported.contains(f.required_features());
let format = caps let format = caps
.formats .formats
.iter() .iter()
.copied() .copied()
.find(|f| !f.is_srgb()) .find(|f| !f.is_srgb() && usable(f))
.or_else(|| caps.formats.iter().copied().find(usable))
.unwrap_or(caps.formats[0]); .unwrap_or(caps.formats[0]);
let present_mode = let present_mode =