Ocean island fragment shader.
More...
|
in vec3 | ifPos |
| World space position.
|
|
in vec3 | ifSrcPos |
| World space position before waves perturbation.
|
|
in vec3 | ifPrevPos |
| World space position before small scale waves perturbation.
|
|
uniform vec3 | camPos |
| Camera world position.
|
|
uniform vec2 | invTargetSize |
| Destination framebuffer size.
|
|
uniform float | time |
| Elapsed time.
|
|
uniform float | waterGridHalf |
| Half-size of the water grid.
|
|
uniform float | groundGridHalf |
| Half-size of the terrain grid.
|
|
uniform float | invTexelSize |
| Size of a terrain map texel in world space.
|
|
uniform float | invMapSize |
| Inverse terrain map size.
|
|
uniform bool | underwater |
| Is the camera underwater.
|
|
uniform bool | debugCol |
| Use debug color instead of shading.
|
|
uniform bool | distantProxy |
| Are we currently rendering the distant proxy.
|
|
uniform bool | useTerrain |
| Is the terrain currently renderer (for shadows)
|
|
uniform uniform uniform Wave | waves [8] |
| Gerstner waves. More...
|
|
out vec4 | fragColor |
| Water shading.
|
|
out vec4 | fragWorldPos |
| Ocean world position.
|
|
◆ fresnelWater()
float GPUShaders::Frag::Ocean_island::fresnelWater |
( |
float |
NdotV | ) |
|
|
inline |
Evaluate Fresnel coefficient for air/water interface.
- Parameters
-
NdotV | angle difference between the surface normal and the view direction |
- Returns
- the Fresnel coefficient
◆ main()
void GPUShaders::Frag::Ocean_island::main |
( |
| ) |
|
|
inline |
Ocean shading, applying absorption, scattering, foam, waves shading.
◆ waves
uniform uniform uniform Wave GPUShaders::Frag::Ocean_island::waves[8] |
Gerstner waves.
Gerstner waves parameters.
The documentation for this class was generated from the following file:
- resources/island/shaders/ocean_island.frag