Increasing Access
Unsure
Most appropriate sub-area of p5.js?
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!
Increasing Access
Unsure
Most appropriate sub-area of p5.js?
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!