Support noiseDetail in p5.strands
Increasing access
In p5.js, the fractal application of noise() is controlled by noiseDetail(). Inside of p5.strands, we now also support noise(), but confusingly to newcomers, noiseDetail() will not affect it. To make this aspect of p5.strands shaders as approachable as possible, we should make the noise behaviour of regular p5 also work in p5.strands.
Most appropriate sub-area of p5.js?
- [ ] Accessibility
- [ ] Color
- [ ] Core/Environment/Rendering
- [ ] Data
- [ ] DOM
- [ ] Events
- [ ] Image
- [ ] IO
- [ ] Math
- [ ] Typography
- [ ] Utilities
- [x] WebGL
- [ ] Build process
- [ ] Unit testing
- [ ] Internationalization
- [ ] Friendly errors
- [ ] Other (specify if possible)
Feature enhancement details
In p5, parameters of noise are currently set via noiseDetail.. There is some discussion in https://github.com/processing/p5.js/issues/7430 about possible changes to that behaviour in the future, but whatever the current state of noiseDetail is, we should match that behaviour in p5.strands.
noiseDetail sets a falloff multiplier and number of octaves. In p5.strands, these values are currently hardcoded in our GLSL implementation: https://github.com/processing/p5.js/blob/6c6ac6c73cf1ed74a2896e0edfcdf1fcfff0bb28/src/webgl/shaders/functions/noise3DGLSL.glsl#L97-L105
To make this work correctly, we'll need to dynamically pass in those values from p5 as an argument. Currently, we translate users' arguments into a single vec3 input. Maybe what we need to do it, at the time we do this, grab the current noise falloff and octaves, and pass those in as additional parameters?
Hey @davepagurek I would love to work on this issue , Can you assign me this, thanks
Thanks @hxrshxz!
Hi @davepagurek just wondering if I could work on this issue since the previous assignee's most recent update was nearly a month ago?
Thanks @ZhYGuoL! Do you mind explaining a bit about what your approach will be, since this is a slightly advanced task?
hey @davepagurek @ZhYGuoL I will update the changes I am sorry I got busy with my university exams