@@ -297,14 +297,15 @@ class Shader {
297
297
* createCanvas(200, 200, WEBGL);
298
298
* myShader = baseMaterialShader().modify(() => {
299
299
* getPixelInputs((inputs) => {
300
- * inputs.color = [1, 0 , 0, 1];
300
+ * inputs.color = [inputs.texCoord , 0, 1];
301
301
* return inputs;
302
302
* });
303
303
* });
304
304
* }
305
305
*
306
306
* function draw() {
307
307
* background(255);
308
+ * noStroke();
308
309
* shader(myShader); // Apply the custom shader
309
310
* plane(width, height); // Draw a plane with the shader applied
310
311
* }
@@ -327,14 +328,19 @@ class Shader {
327
328
* let t = uniformFloat(() => millis());
328
329
*
329
330
* getPixelInputs((inputs) => {
330
- * inputs.color = [sin(t * 0.01) / 2 + 0.5, 0, 0, 1];
331
+ * inputs.color = [
332
+ * inputs.texCoord,
333
+ * sin(t * 0.01) / 2 + 0.5,
334
+ * 1,
335
+ * ];
331
336
* return inputs;
332
337
* });
333
338
* });
334
339
* }
335
340
*
336
341
* function draw() {
337
342
* background(255);
343
+ * noStroke(255);
338
344
* shader(myShader); // Apply the custom shader
339
345
* plane(width, height); // Draw a plane with the shader applied
340
346
* }
@@ -354,14 +360,15 @@ class Shader {
354
360
* sketch.createCanvas(200, 200, sketch.WEBGL);
355
361
* myShader = sketch.baseMaterialShader().modify(() => {
356
362
* sketch.getPixelInputs((inputs) => {
357
- * inputs.color = [1, 0 , 0, 1];
363
+ * inputs.color = [inputs.texCoord , 0, 1];
358
364
* return inputs;
359
365
* });
360
366
* }, { sketch });
361
367
* }
362
368
*
363
369
* sketch.draw = function() {
364
370
* sketch.background(255);
371
+ * sketch.noStroke();
365
372
* sketch.shader(myShader); // Apply the custom shader
366
373
* sketch.plane(sketch.width, sketch.height); // Draw a plane with the shader applied
367
374
* }
0 commit comments