Skip to content

Commit 6e1311d

Browse files
committed
Fix shouldDiscard example
1 parent 36c4c2d commit 6e1311d

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

src/webgl/ShaderGenerator.js

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1883,10 +1883,8 @@ if (typeof p5 !== 'undefined') {
18831883
* let myShader;
18841884
* function setup() {
18851885
* createCanvas(200, 200, WEBGL);
1886-
* myShader = baseStrokeShader().modify(() => {
1887-
* shouldDiscard(willDiscard => {
1888-
* // Discard fragments based only on the default logic
1889-
* return willDiscard;
1886+
* myShader = baseStrokeShader().modify({
1887+
* 'bool shouldDiscard': '(bool outside) { return outside; }'
18901888
* });
18911889
* }
18921890
* function draw() {

0 commit comments

Comments
 (0)