Volumetric fog shape control using shader #9248
Obscurite1221
started this conversation in
3D
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Currently, I'm struggling to make a dynamically shaped volumetric fog implementation using the existing tools for fog shaders. I think there's technically a way to make interactive fog (E.g. Flowing to fill lower spaces or moving around Fog Volumes in unique manners defined by developer's implementation) by working around it with a generated texture each frame, but this would be exceedingly slow.
The current fog shader is useful to modify the fog according to a static behavior, but it's basically very difficult or impossible to make the fog have a dynamic shape. You can use one or more fog volumes to reshape it, but it still can't really be changed easily. The other alternative is creating a fog system with particles, but that's not really ideal either.
I'm not 100% on how to optimally fix this problem, and it may be the case that I just missed a way to do this easily, which is entirely possible. If not, then I imagine the solution would involve modifying the fog shader implementation to use process() and retain the previous frame's output, similar to the particle shader. Alternatively, if there was some way to store the fog data every frame in such a way that it was externally modifiable and internally (inside the shader) accessible, this would also solve the problem.
It would enable significantly more sophisticated fog volume control in functionally every regard, and it could even save in computation time for complex fog calculations (Several fog volumes running overlapping calculations on the same froxels).
Beta Was this translation helpful? Give feedback.
All reactions