Skip to content

Commit 762f58b

Browse files
authored
Merge pull request #7636 from perminder-17/loadFilterShader-docs
loadFilterShader fixes
2 parents d72744a + 961b6a6 commit 762f58b

File tree

2 files changed

+9
-9
lines changed

2 files changed

+9
-9
lines changed

lib/empty-example/sketch.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
function setup() {
2-
// put setup code here
3-
}
4-
5-
function draw() {
6-
// put drawing code here
7-
}
2+
// put setup code here
3+
}
4+
5+
function draw() {
6+
// put drawing code here
7+
}

src/webgl/material.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -533,7 +533,7 @@ function material(p5, fn){
533533
* let myShader;
534534
*
535535
* async function setup() {
536-
* myShader = await loadFilterShader('assets/shader.frag');
536+
* myShader = await loadFilterShader('assets/basic.frag');
537537
* createCanvas(100, 100, WEBGL);
538538
* noStroke();
539539
* }
@@ -543,15 +543,15 @@ function material(p5, fn){
543543
* shader(myShader);
544544
*
545545
* // rect gives us some geometry on the screen
546-
* rect(0, 0, width, height);
546+
* rect(-50, -50, width, height);
547547
* }
548548
* </code>
549549
* </div>
550550
* @alt
551551
* A rectangle with a shader applied to it.
552552
*/
553553
fn.loadFilterShader = async function (fragFilename, successCallback, failureCallback) {
554-
p5._validateParameters('loadFilterShader', arguments);
554+
// p5._validateParameters('loadFilterShader', arguments);
555555
try {
556556
// Load the fragment shader
557557
const fragSrc = await this.loadStrings(fragFilename);

0 commit comments

Comments
 (0)