bevy_water
bevy_water copied to clipboard
Support terrain heightmap in WaterMaterial.
Having access to a terrain heightmap would allow:
- Nicer waves on shorelines/beaches.
- Breaking waves (Surfing?).
- Water color based on depth. (Done via DepthPass support). Water depth color is relative to the viewer, so needs the view depth texture.
- Waves breaking against cliff faces.
Sounds good. Does that work with the predefined wave function?
For point 3, that is just the color (darker for deeper water). For the other points it would need to change the wave function.
Regarding 3. could you use the pbr fog for that?
Ah. That might work too. I also want to use the "fog" effect when the camera is below the surface. Right now the space below is just empty. Not sure if the bevy PBR fog can be used for the "water fog", since it needs to only be applied below the surface. But it should be possible to reuse/adapt that code to do it.