Underwater Profile
Scriptable Object that contains configuration for underwater effect.
Underwater in Dragon Water is binary - everything on screen is either underwater, or not.
Such technique results with simpler and visually better underwater effect with working transparent objects, but you won't be able to see both enivornments at the same time on screen.
This drawback, however, is internally solved by snapping camera to water surface in render feature (see URP Render Feature).
Underwater profile is set of effects that applies to enivornment.
You can add custom effects in two ways via scripting:
- Extend
Show
andHide
functions insideUnderwaterProfile.cs
- Register to
DragonWaterManager.Instance.OnUnderwaterChanged
event
NOTE: If you are changing underwater profile values via scripting, you may need to call DragonWaterManager.Instance.UpdateUnderwaterProfile()
in order to apply changes when you are already under water.
Fog
With this option you can override built-in fog parameters when under water.
- Show Superfar Plane - default fog is not rendered if there is no geometry on screen. If your underwater scene isn't filled with geometry, you can enable this to draw fake flat plane at the end of camera visibility frustum.
God Rays
When enabled, rays of volumetric lighting will be rendered.
Their final color is also affected by main directional light color.
NOTE: This option is quite heavy - try to keep with low density values if you're struggling with performance issues.
Caustics
When enabled, screen-space caustics will be rnedered.
You have to provide two grayscale R-channel textures, they will be animated and blended together.
NOTE: Chromatic aberration triples amount of calculation (RGB split), so be careful if you're struggling with performance issues.