|
Texture | _sceneColor |
| Scene lighting.
|
|
Texture | _scenePosition |
| Scene positions.
|
|
Texture | _sceneDepth |
| Scene depth.
|
|
Texture | _waterEffectsHalf |
| Underwater terrain with caustics.
|
|
Texture | _waterPos |
| Underwater terrain world positions.
|
|
Texture | _waterEffectsBlur |
| Blurred underwater terrain.
|
|
Texture | _environment |
| Environment cubemap.
|
|
BoxBlur | _blur = BoxBlur(true, "Water") |
| Underwater terrain blurring.
|
|
std::unique_ptr< Terrain > | _terrain |
| Terrain generator and rendering data.
|
|
const Mesh * | _skyMesh |
| Sky supporting mesh.
|
|
Mesh | _oceanMesh |
| Ocean grid mesh.
|
|
Mesh | _farOceanMesh |
| Far ocean supporting cylinder mesh.
|
|
const Texture * | _caustics |
| Caustics texture.
|
|
const Texture * | _waveNormals |
| Small waves normal map.
|
|
const Texture * | _foam |
| Foam texture.
|
|
const Texture * | _brdfLUT |
| Linearized GGX BRDF look-up table.
|
|
const Texture * | _sandMapSteep |
| Normal map for steep dunes.
|
|
const Texture * | _sandMapFlat |
| Normal map for flat regions.
|
|
const Texture * | _precomputedScattering |
| Precomputed lookup table for atmospheric scattering.
|
|
const Texture * | _absorbScatterOcean |
| Precomputed lookup table for ocean absoprtion/scattering.
|
|
Texture | _surfaceNoise |
| Sand surface normal noise.
|
|
Texture | _glitterNoise |
| Specular sand noise.
|
|
Program * | _groundProgram |
| Terrain shader.
|
|
Program * | _oceanProgram |
| Ocean shader.
|
|
Program * | _farOceanProgram |
| Distant ocean simplified shader.
|
|
Program * | _waterCopy |
| Apply underwater terrain effects (caustics).
|
|
Program * | _underwaterProgram |
| Underwater rendering.
|
|
Program * | _skyProgram |
| Atmospheric scattering shader.
|
|
Program * | _tonemap |
| Tonemapping shader.
|
|
glm::vec3 | _lightDirection |
| Sun light direction.
|
|
float | _lightElevation = 6.0f |
| Sun angular elevation.
|
|
float | _lightAzimuth = 43.0f |
| Sun horizontal orientation.
|
|
bool | _shouldUpdateSky = true |
| Should the environment map be updated at this frame.
|
|
UniformBuffer< GerstnerWave > | _waves |
| Waves parameters.
|
|
const int | _gridOceanRes = 64 |
| Ocean grid resolution.
|
|
float | _maxLevelX = 1.0f |
| Maximum level of detail.
|
|
float | _maxLevelY = 1.0f |
| Maximum subdivision amount.
|
|
float | _distanceScale = 1.0f |
| Extra distance scaling.
|
|
bool | _showTerrain = true |
| Should the terrain be displayed.
|
|
bool | _showOcean = true |
| Should the ocean be displayed.
|
|
bool | _showSky = true |
| Should the sky be displayed.
|
|
bool | _stopTime = false |
| Pause ocean animation.
|
|
bool | _showWire = false |
| Show debug wireframe.
|
|
Realistic rendering of a sandy island in the ocean.
The terrain is rendered as a integer-shifted vertex grid as described by M. McGuire in his post "Fast Terrain Rendering with Continuous Detail on a Modern GPU", 2014 (http://casual-effects.blogspot.com/2014/04/fast-terrain-rendering-with-continuous.html). High-frequency sand shading is based on the "Sand Rendering in Journey" presentation, J. Edwards, GDC 2013 (https://www.youtube.com/watch?v=wt2yYnBRD3U).
Ocean is tesselated on the fly based on the distance to the camera and displaced using Gerstner waves as described in "Effective Water Simulation from Physical Models", M. Finch, GPU Gems 2007 (https://developer.nvidia.com/gpugems/gpugems/part-i-natural-effects/chapter-1-effective-water-simulation-physical-models). Caustics, scattering and absorption effects are based on the Hitman "From Shore to Horizon: Creating a Practical Tessellation Based Solution" presentation, N. Longchamps, GDC 2017 (https://www.gdcvault.com/play/1024591/From-Shore-to-) Additional foam effects are inspired by the "Multi-resolution Ocean Rendering in Crest Ocean System" presentation, H. Bowles, Siggraph 2019 (http://advances.realtimerendering.com/s2019/index.htm).