We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent df4c546 commit 0cd9448Copy full SHA for 0cd9448
src/webgl/ShaderGenerator.js
@@ -1631,12 +1631,10 @@ function shadergenerator(p5, fn) {
1631
return originalLerp.apply(this, args); // Fallback to normal p5.js lerp
1632
}
1633
};
1634
+ const originalNoise = fn.noise;
1635
fn.noise = function (...args) {
1636
if (!GLOBAL_SHADER?.isGenerating) {
- p5._friendlyError(
1637
- `It looks like you've called noise() outside of a shader's modify() function.`
1638
- );
1639
- return;
+ return originalNoise.apply(this, args); // fallback to regular p5.js noise
1640
1641
1642
GLOBAL_SHADER.output.vertexDeclarations.add(noiseGLSL);
0 commit comments