-
-
Notifications
You must be signed in to change notification settings - Fork 3.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add fog #5878
Comments
The p5.js community has made a commitment to only add features to p5.js that expand access. Could you please add an access statement to the feature request? Thank you! |
Hey just chiming in here. |
I agree this could be useful! Are there other material settings we might want to also consider, now that we're moving to a more modular material approach thanks to this GSoC project #5774? e.g.:
We by no means need to do all or even any of those, but it might be useful deciding on a direction for the material system first in order to decide where fog fits in / where the best place to put it would be. If there's interest I can make an issue to discuss that! If we think those are all out of scope though, we can look at fog independently. |
Thanks @harveymoon and @davepagurek. I'm inviting more webGL stewards to this discussion @stalgiag, @aferriss, @kjhollen, @ShenpaiSharma, @calebfoss. Would love to hear what you think! |
For organizational purposes, I'm going to close this issue in favour of #6144: Ideally, we will try to keep our core material fairly small, and built in a way where it is feasible for more rendering features to be added by plugins. |
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!
The text was updated successfully, but these errors were encountered: