mirror of
https://github.com/seigler/generative
synced 2025-07-26 22:56:10 +00:00
Remove webgl from two sketches for compatibility with KDE Plasma HTMLWallpaper
This commit is contained in:
parent
57ac17c916
commit
d0803fb9ac
4 changed files with 41 additions and 22 deletions
|
@ -10,10 +10,10 @@ new p5(sketch => {
|
|||
const assets = {}; // fonts, images, sound files
|
||||
|
||||
sketch.preload = () => {
|
||||
shaders.whiteNoise = sketch.loadShader(
|
||||
'../shaders/base.vert',
|
||||
'../shaders/white-noise.frag'
|
||||
);
|
||||
// shaders.whiteNoise = sketch.loadShader(
|
||||
// '../shaders/base.vert',
|
||||
// '../shaders/white-noise.frag'
|
||||
// );
|
||||
// shaders.blurH = sketch.loadShader(
|
||||
// '../shaders/base.vert',
|
||||
// '../shaders/blur-two-pass.frag'
|
||||
|
@ -45,7 +45,7 @@ new p5(sketch => {
|
|||
layers.stars = sketch.createGraphics(width, height);
|
||||
layers.stars.colorMode(sketch.HSL, 1);
|
||||
|
||||
layers.noise = sketch.createGraphics(width, height, sketch.WEBGL);
|
||||
// layers.noise = sketch.createGraphics(width, height, sketch.WEBGL);
|
||||
|
||||
// layers.blur1 = sketch.createGraphics(width, height, sketch.WEBGL);
|
||||
// layers.blur2 = sketch.createGraphics(width, height, sketch.WEBGL);
|
||||
|
@ -96,13 +96,13 @@ new p5(sketch => {
|
|||
|
||||
sketch.blendMode(sketch.BLEND);
|
||||
sketch.background(0);
|
||||
layers.noise.shader(shaders.whiteNoise);
|
||||
shaders.whiteNoise.setUniform('u_resolution', [width, height]);
|
||||
shaders.whiteNoise.setUniform('u_alpha', 0.05);
|
||||
layers.noise.rect(0, 0, width, height);
|
||||
// layers.noise.shader(shaders.whiteNoise);
|
||||
// shaders.whiteNoise.setUniform('u_resolution', [width, height]);
|
||||
// shaders.whiteNoise.setUniform('u_alpha', 0.05);
|
||||
// layers.noise.rect(0, 0, width, height);
|
||||
sketch.image(layers.stars, Math.round(-width * overdraw/2), Math.round(-height * overdraw/2));
|
||||
sketch.blendMode(sketch.OVERLAY);
|
||||
sketch.image(layers.noise, 0, 0);
|
||||
// sketch.blendMode(sketch.OVERLAY);
|
||||
// sketch.image(layers.noise, 0, 0);
|
||||
}
|
||||
|
||||
function addStars(layer) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue