Functions | |
vec2 | GetTexCoord (vec2 k) |
Computes texture coordinates. | |
vec3 | CreateWave (float w, float A, vec2 D, float Q, float phi) |
Computes displacement for gerstner waves. | |
void | main () |
Variables | |
uniform sampler2D | texGround |
uniform float | t |
uniform float | A |
uniform float | altitude |
uniform float | waterHorizon |
uniform vec2 | k1 |
uniform vec2 | k2 |
uniform vec2 | k3 |
uniform vec2 | k4 |
uniform vec2 | k5 |
uniform vec2 | k6 |
uniform vec4 | wav1 |
uniform vec4 | wav2 |
uniform vec4 | wav3 |
uniform vec4 | wav4 |
uniform vec4 | wav5 |
uniform vec4 | wav6 |
uniform mat4 | rangeMatrix |
uniform mat4 | projectorModelViewProjectionMatrixInverse |
varying vec4 | Vertex |
varying vec4 | fragPos |
varying float | antiAliasHorizon |
varying float | antiAliasAltitude |
varying vec2 | texCoord1 |
varying vec2 | texCoord2 |
varying vec2 | texCoord3 |
vec4 | pInt |
vec4 | color |
varying float | ground_height |
vec3 CreateWave | ( | float | w, | |
float | A, | |||
vec2 | D, | |||
float | Q, | |||
float | phi | |||
) |
Computes displacement for gerstner waves.
w | the spatial frequency of the wave | |
A | the amplitude of the wave | |
D | the direction (i.e. wave vector) of the wave | |
Q | the steepness of the wave | |
phi | the temporal frequency of the wave |
vec2 GetTexCoord | ( | vec2 | k | ) |
Computes texture coordinates.
Calculates texture coordinates for the noise texture for waves moving with wave vector k.
The | wave vector for the wave (i.e direction and speed of the wave) |
void main | ( | ) |
uniform float A |
uniform float altitude |
varying float antiAliasAltitude |
varying float antiAliasHorizon |
vec4 color |
varying vec4 fragPos |
varying float ground_height |
uniform vec2 k1 |
uniform vec2 k2 |
uniform vec2 k3 |
uniform vec2 k4 |
uniform vec2 k5 |
uniform vec2 k6 |
vec4 pInt |
uniform mat4 projectorModelViewProjectionMatrixInverse |
uniform mat4 rangeMatrix |
uniform float t |
Time variable to use in animations
varying vec2 texCoord1 |
varying vec2 texCoord2 |
varying vec2 texCoord3 |
uniform sampler2D texGround |
varying vec4 Vertex |
uniform float waterHorizon |
Distance to the water horizon
uniform vec4 wav1 |
uniform vec4 wav2 |
uniform vec4 wav3 |
uniform vec4 wav4 |
uniform vec4 wav5 |
uniform vec4 wav6 |