This browser has no WebGPU, so the sketch cannot run here. The program is below, and it runs in a current Chrome, Edge or Safari.
Camera Morph
Use perlin noise to modulate a live webcam input stream
//////////////////////////////////////////////////////////
// camera-morph
// Use perlin noise to modulate a live webcam input stream
// go to >project - inputs to select camera
//////////////////////////////////////////////////////////
&time = mlt(step, 0.005);
// apply 3D perlin noise using LATT
&coord = add(C, (0,0, &time)); // affect z axis only
&perlin = LATT.CUBE[&coord]{ dot(nrm(R), D) };
// draw the camera input into a field
#cam{
dim = (640, 480,1);
run = <webcam>;
}
// fix aspect ratio from 3-4 to 1-1.
#aspectFix{
dim = (256,256,1);
run = #cam[ mlt(C, (-0.75, 1, 1) ) ];
}
// lower resolution
// apply perlin noise to absolute lookup
// apply a threshold on the color
#morph{
dim = (64,64,1);
run = lrg(#aspectFix[ add(C, &perlin ) ], 0.6);
}
~aspectFix{
col = #aspectFix;
pos = (-1,0,0);
}
~morph{
col = #morph;
pos = (1,0,0);
}