-
-
Notifications
You must be signed in to change notification settings - Fork 35.6k
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
Fog gradients / Different colors #3309
Comments
Uh... nope. It's a nice idea though. |
Hello, @mrdoob Will you add it :) ? Thanks, |
I'll keep this issue open until it's somehow supported. |
I think it’s not fog exactly, but three-vignette-background does a nice background gradient effect. Probably good enough for many use cases? |
A background gradient/color effect could be add to the scenes folder. This type of features should be supported by the library IMO. |
Would love to try and implement this. In my case I'd want the fog to match a texture. For instance, let's say I have a perlin noise background in a scene which also has fog, the items in the scene currently fade out as one colour, so are still visible as silhouettes against the perlin background. Does anyone have any pointers on how this could be achieved? I'd love to tackle the problem! |
@funwithtriangles Any luck? |
Unfortunately not. Still keen to try it when I get the time! Here's how I think it could work:
Otherwise perhaps it's already achievable with a multi-pass approach? |
Such gradient effects can be implemented now with TSL in different ways. There are existing example that demonstrate radial or linear gradients. E.g.: https://threejs.org/examples/webgpu_postprocessing_ssr Custom fog can be implemented in TSL as well. webgpu_custom_fog_background use a single fog color but it can be enhanced to use two and interpolate between both colors depending on the fog factor. Something like |
Hello,
Is there any way to have gradient color for the fog or have the fog color change in certain areas of the fog, instead of fog being a single color?
Thanks,
Reece
The text was updated successfully, but these errors were encountered: