This file contains invisible Unicode characters that may be processed differently from what appears below. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to reveal hidden characters.
letmyShader;
functionpreload(){
// load each shader file (don't worry, we will come back to these!)
myShader=loadShader('shader.vert','shader.frag');
}
functionsetup(){
// the canvas has to be created with WEBGL mode
createCanvas(windowWidth,windowHeight,WEBGL);
}
functiondraw(){
// shader() sets the active shader, which will be applied to what is drawn next
shader(myShader);
// apply the shader to a rectangle taking up the full canvas