Rendu
A lightweight rendering engine for experimentations
Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | List of all members
GPUShaders::Frag::Ocean_island Class Reference

Ocean island fragment shader. More...

Public Member Functions

float fresnelWater (float NdotV)
 
void main ()
 

Public Attributes

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.
 

Detailed Description

Ocean island fragment shader.

See also
GPUShaders::Common::Utils, GPUShaders::Common::Samplers, GPUShaders::Common::Gerstner_waves

Member Function Documentation

◆ fresnelWater()

float GPUShaders::Frag::Ocean_island::fresnelWater ( float  NdotV)
inline

Evaluate Fresnel coefficient for air/water interface.

Parameters
NdotVangle 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.

Member Data Documentation

◆ 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: