Add noiseDetail() support for p5.strands
Resolves #8160
Changes:
This PR adds support for noiseDetail() in p5.strands by exposing noise parameters to shaders via uniforms.
Screenshots of the change:
PR Checklist
- [x]
npm run lintpasses - [x] Inline reference is included / updated
- [x] Unit tests are included / updated
This approach looks like it should work! I haven't yet had the chance to run this myself, but it would help with review if you tried making a test sketch that uses noise + noiseDetail in a strands shader. This can be in the p5 web editor, although there you'll have to manually upload your lib/p5.js after running npm run build to the web editor assets and edit index.html to use that instead of the p5 CDN in order to have your sketch use the updated library code.
It also looks like there's a merge conflict that needs resolution. Is that something you're comfortable doing?
https://editor.p5js.org/harshmastic/sketches/JAcdZZZNo Hey I have tested the sketch as u suggeted and it's working fine ,also fixed the merge conflict
Hi @hxrshxz! It looks like that example isn't using noise in p5.strands, it's using it in beginShape/endShape. A test of p5.strands would use noise to offset vertex positions in a shader, and then draw content using that shader. I also see that it's logging warnings about the usage of text(), and the text you're rendering doesn't show up. Please make sure you take a look at the output if you're using AI tools to assist you.
@davepagurek Sorry for the delay I was actually busy with my university exams . I Will update the Pull request in some days
https://editor.p5js.org/harshmastic/sketches/F4sFSd0wP - Here's the new sketch