-
-
Notifications
You must be signed in to change notification settings - Fork 3.7k
Description
Nature of issue?
Using the same shader more than once causes either nothing or an odd looking tessellated plane to be rendered on the screen. I made an alpha editor sketch to show the issue.
The use case I'm imagining for using the same shader more than once is when you want to do some kind of multi-pass effect like a gaussian blur. It would be great to just write one shader that you could pass a direction uniform to, rather than have two separate shaders with almost exactly the same code.
A simple workaround is just to make two shader variables with the same shader source. WebGL doesn't spit out any errors as far as I can tell. Though it does say something whever I use createCapture with a shader and a createGraphics layer. Error: WebGL warning: drawElements: Active texture 0 for target 0x0de1 is 'incomplete', and will be rendered as RGBA(0,0,0,1), as per the GLES 2.0.24 $3.8.2: The dimensions of level_base are not all positive.
- Found a bug
- Existing feature enhancement
- New feature request
Most appropriate sub-area of p5.js?
- Color
- Core/Environment/Rendering
- Data
- Events
- Image
- IO
- Math
- Typography
- Utilities
- WebGL
- Other (specify if possible)
Which platform were you using when you encountered this?
- Mobile/Tablet (touch devices)
- Desktop/Laptop
- Others (specify if possible)
Details about the bug:
- p5.js version: 0.6.1
- Web browser and version: Chrome 66 and Firefox 60
- Operating System: Linux / Ubuntu 16.04
- Steps to reproduce this: https://alpha.editor.p5js.org/aferriss/sketches/r1NNRmSRM
Metadata
Metadata
Assignees
Labels
Type
Projects
Status