Closed
Description
Most appropriate sub-area of p5.js?
- Accessibility (Web Accessibility)
- Build tools and processes
- Color
- Core/Environment/Rendering
- Data
- DOM
- Events
- Friendly error system
- Image
- IO (Input/Output)
- Localization
- Math
- Unit Testing
- Typography
- Utilities
- WebGL
- Other (specify if possible)
Details about the bug:
If you are using the vertex function and supplying your own UV's, when using the setUniform()
function to send a texture to a custom shader, a warning is triggered telling you: "You must first call texture() before using vertex() with image based u and v coordinates ".
Since we're supplying the texture with setUniform()
, we shouldn't be showing this warning.
Actually, I think there is a case to be made to remove this warning entirely. It could be that the user is writing a procedural shader, and not using textures, in which case, the warning isn't necessary at all.
The warning seems to go away when using textureMode(NORMAL);
- p5.js version: 1.4
- Web browser and version: Chrome 96
- Operating System: Mac OSX
- Steps to reproduce this:
- Load a custom shader that samples a texture
- Send the texture to the shader
- Draw some geometry with beginShape(), vertex() ....
- Observe the warning.
Here's a small example showing the issue
Metadata
Metadata
Assignees
Type
Projects
Status
DONE! 🎉