Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions lib/empty-example/sketch.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
function setup() {
// put setup code here
}

function draw() {
// put drawing code here
}
// put setup code here
}
function draw() {
// put drawing code here
}
6 changes: 3 additions & 3 deletions src/webgl/material.js
Original file line number Diff line number Diff line change
Expand Up @@ -533,7 +533,7 @@ function material(p5, fn){
* let myShader;
*
* async function setup() {
* myShader = await loadFilterShader('assets/shader.frag');
* myShader = await loadFilterShader('assets/basic.frag');
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

there were some linking issue with vertex shader from shader.frag, so using basic.frag

Screenshot from 2025-03-16 03-50-04

* createCanvas(100, 100, WEBGL);
* noStroke();
* }
Expand All @@ -543,15 +543,15 @@ function material(p5, fn){
* shader(myShader);
*
* // rect gives us some geometry on the screen
* rect(0, 0, width, height);
* rect(-50, -50, width, height);
* }
* </code>
* </div>
* @alt
* A rectangle with a shader applied to it.
*/
fn.loadFilterShader = async function (fragFilename, successCallback, failureCallback) {
p5._validateParameters('loadFilterShader', arguments);
// p5._validateParameters('loadFilterShader', arguments);
try {
// Load the fragment shader
const fragSrc = await this.loadStrings(fragFilename);
Expand Down