Closed
Description
Increasing Access
Unsure
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
- Internalization
- Friendly Errors
- Other (specify if possible)
Feature request details
Hi,
Would it be possible to add fog for WebGL rendering?
I tried adding it by hijacking some methods, here's how I did it:
https://github.com/titoasty/p5.js-boost/blob/main/fog.js
(it adds the function fog(r, g, b, start, end))
And the shader, based of phong.frag:
https://github.com/titoasty/p5.js-boost/blob/main/assets/shaders/phongFog.frag
The shader code comes from here: https://github.com/hughsk/glsl-fog
Thanks!