Bartek Dragon Docs
You are here: Bartek Dragon Docs » Dragon Water » Underwater Profile

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 and Hide functions inside UnderwaterProfile.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.


Volume

With this option you can enable additional global post-processing volume to override some of the effects when under water.

Previous Next

Bartek Dragon Docs

Table of Contents

Table of Contents

  • Underwater Profile
    • Fog
    • God Rays
    • Caustics
    • Volume

Dragon Water

  • About
  • Changelog
  • Getting Started

Documentation

  • Water Surface
  • Wave Profile
  • Material Profile
  • Underwater Profile
  • Dragon Water Config
  • Cutout Volumes
  • Ripple Effect
  • Local Wave Areas

URP

  • URP Render Feature

Physics

  • Floating Body

Scripting

  • Scripting API
  • Water Sampler
  • Water Behaviour

How-To

  • Build Optimization
  • Multiplayer Synchronization