3#include "Application.hpp"
4#include "input/Input.hpp"
5#include "processing/BoxBlur.hpp"
6#include "resources/ResourcesManager.hpp"
7#include "resources/Texture.hpp"
8#include "graphics/GPU.hpp"
9#include "generation/PerlinNoise.hpp"
10#include "generation/Random.hpp"
11#include "system/Window.hpp"
12#include "system/System.hpp"
13#include "system/Config.hpp"
51 glm::vec4
AQwp = glm::vec4(0.2f, 0.5f, 0.5f, 0.2f);
Window & window()
Definition: Application.cpp:95
Applies a box blur of fixed radius 2. Correspond to uniformly averaging values over a 5x5 square wind...
Definition: BoxBlur.hpp:12
Application with an interactive camera.
Definition: Application.hpp:89
Realistic rendering of a sandy island in the ocean.
Definition: IslandApp.hpp:25
const Mesh * _skyMesh
Sky supporting mesh.
Definition: IslandApp.hpp:69
Program * _groundProgram
Terrain shader.
Definition: IslandApp.hpp:86
bool _showTerrain
Should the terrain be displayed.
Definition: IslandApp.hpp:108
const Texture * _absorbScatterOcean
Precomputed lookup table for ocean absoprtion/scattering.
Definition: IslandApp.hpp:81
Texture _glitterNoise
Specular sand noise.
Definition: IslandApp.hpp:83
bool _shouldUpdateSky
Should the environment map be updated at this frame.
Definition: IslandApp.hpp:98
bool _stopTime
Pause ocean animation.
Definition: IslandApp.hpp:111
BoxBlur _blur
Underwater terrain blurring.
Definition: IslandApp.hpp:65
std::unique_ptr< Terrain > _terrain
Terrain generator and rendering data.
Definition: IslandApp.hpp:68
glm::vec3 _lightDirection
Sun light direction.
Definition: IslandApp.hpp:95
void resize() override
Definition: IslandApp.cpp:543
Texture _sceneDepth
Scene depth.
Definition: IslandApp.hpp:60
Program * _waterCopy
Apply underwater terrain effects (caustics).
Definition: IslandApp.hpp:89
bool _showOcean
Should the ocean be displayed.
Definition: IslandApp.hpp:109
Mesh _oceanMesh
Ocean grid mesh.
Definition: IslandApp.hpp:70
const Texture * _caustics
Caustics texture.
Definition: IslandApp.hpp:74
float _maxLevelY
Maximum subdivision amount.
Definition: IslandApp.hpp:104
bool _showWire
Show debug wireframe.
Definition: IslandApp.hpp:112
~IslandApp() override
Definition: IslandApp.cpp:554
void update() override
Definition: IslandApp.cpp:455
Texture _surfaceNoise
Sand surface normal noise.
Definition: IslandApp.hpp:82
float _lightElevation
Sun angular elevation.
Definition: IslandApp.hpp:96
const Texture * _sandMapFlat
Normal map for flat regions.
Definition: IslandApp.hpp:79
Texture _environment
Environment cubemap.
Definition: IslandApp.hpp:64
const Texture * _foam
Foam texture.
Definition: IslandApp.hpp:76
const Texture * _precomputedScattering
Precomputed lookup table for atmospheric scattering.
Definition: IslandApp.hpp:80
bool _showSky
Should the sky be displayed.
Definition: IslandApp.hpp:110
Program * _farOceanProgram
Distant ocean simplified shader.
Definition: IslandApp.hpp:88
Texture _waterEffectsBlur
Blurred underwater terrain.
Definition: IslandApp.hpp:63
const int _gridOceanRes
Ocean grid resolution.
Definition: IslandApp.hpp:102
Mesh _farOceanMesh
Far ocean supporting cylinder mesh.
Definition: IslandApp.hpp:71
Program * _skyProgram
Atmospheric scattering shader.
Definition: IslandApp.hpp:91
Texture _waterEffectsHalf
Underwater terrain with caustics.
Definition: IslandApp.hpp:61
Program * _underwaterProgram
Underwater rendering.
Definition: IslandApp.hpp:90
Texture _sceneColor
Scene lighting.
Definition: IslandApp.hpp:58
float _distanceScale
Extra distance scaling.
Definition: IslandApp.hpp:105
void generateWaves()
Definition: IslandApp.cpp:114
const Texture * _sandMapSteep
Normal map for steep dunes.
Definition: IslandApp.hpp:78
const Texture * _brdfLUT
Linearized GGX BRDF look-up table.
Definition: IslandApp.hpp:77
Texture _scenePosition
Scene positions.
Definition: IslandApp.hpp:59
Texture _waterPos
Underwater terrain world positions.
Definition: IslandApp.hpp:62
float _lightAzimuth
Sun horizontal orientation.
Definition: IslandApp.hpp:97
Program * _oceanProgram
Ocean shader.
Definition: IslandApp.hpp:87
float _maxLevelX
Maximum level of detail.
Definition: IslandApp.hpp:103
void draw() override
Definition: IslandApp.cpp:152
Program * _tonemap
Tonemapping shader.
Definition: IslandApp.hpp:92
const Texture * _waveNormals
Small waves normal map.
Definition: IslandApp.hpp:75
UniformBuffer< GerstnerWave > _waves
Waves parameters.
Definition: IslandApp.hpp:101
Represents a geometric mesh composed of vertices, other attributes and triangles.
Definition: Mesh.hpp:15
Represents a group of shaders used for rendering.
Definition: Program.hpp:31
Configuration containing parameters for windows and renderers.
Definition: Config.hpp:113
Represents a texture containing one or more images, stored on the CPU and/or GPU.
Definition: Texture.hpp:12
Represent an OS window and its associated rendering context.
Definition: Window.hpp:14
Definition: IslandApp.hpp:49
glm::vec4 DiAngleActive
2D direction, angle and flag.
Definition: IslandApp.hpp:50
glm::vec4 AQwp
Gerstner wave parameters.
Definition: IslandApp.hpp:51