-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
Closed
Labels
Description
Most appropriate sub-area of p5.js?
- Accessibility
- Color
- Core/Environment/Rendering
- Data
- DOM
- Events
- Image
- IO
- Math
- Typography
- Utilities
- WebGL
- Build process
- Unit testing
- Internationalization
- Friendly errors
- Other (specify if possible)
p5.js version
2.0.5, 2.1-b1 (2.0.4+)
Web browser and version
Any
Operating system
Any
Steps to reproduce this
Steps:
- Create a p5.strands shader
- Create a varying variable using
varying*as a prefix
This throws an error.
Snippet:
let testShader
function setup() {
createCanvas(400, 400, WEBGL);
testShader = baseMaterialShader().modify(() => {
let worldPos = varyingVector3()
getWorldInputs((inputs) => {
worldPos = inputs.position.xyz
return inputs
})
getPixelInputs((inputs) => {
inputs.color = [abs(worldPos * 0.01), 1]
return inputs
})
})
}
function draw() {
background(220);
shader(testShader)
sphere(100)
}In 2.0.3 it produces this:
