Cloudy fog effect
New fog type with nlRenderVolFog function, uses ray matching on this fog to appear randomly and move on the map, similar to Rain Mist and this photo
Is this possible?
Would be quite hard to make something similar to that
This is a good suggestion, but I'm not sure how the result will turn out to be. Two ways I think this could be implemented are:
Approach 1 (Realistic):
- Use worldPos and cPos to somehow get tiledWorldPos.
- Create a 3D tiled noise pattern (add linear waves to get motion)
- Add fog fade to 3d noise
- Raymarch volumetrics
- Mix with actual fog
Approach 2 (Just fake it):
- Make some good looking noise pattern
- Add it to fog
Approach 1 isn't really suited for this shader, but it's possible.
I think you add it and add a config line to toggle between the two approach and turn it on and off
does Approach 1 is possible to do in vertex shader?
i know noise is possible but how about for() function?
Approach 1 is possible to do in vertex shader?
Yes, its possible. But it will look a little weird when you move because of interpolation. As example, look at the cloud/aurora reflection on water in this shader.
how about for() function?
Yes you can use any control statement in vertex shader. See GLES 2.0 Reference card to understand GLSL more.
Partially implemented.