|
Waterflow
Visualize water in terrain
|
Fragment shader for terrain rendering. More...
Go to the source code of this file.
Classes | |
| struct | LightParam |
| Struct that contains one light source. More... | |
Functions | |
| layout (std140, binding=0) uniform LightInfo | |
| < All the lights are stored in this buffer | |
| void | main (void) |
Variables | |
| vec3 | ambLight |
| Ambient light color. | |
| uniform vec3 | camPos |
| Camera position. | |
| vec3 | diffLight |
| Diffuse light color. | |
| vec3 | eye |
| Vector from the fragment to the camera. | |
| uniform sampler2D | height_texUnit |
| Terrain geometry (normal and height) texture. | |
| float | kamb |
| Ambient light coefficient. | |
| float | kdiff |
| Diffuse light coefficient. | |
| float | kspec |
| Specular light coefficient. | |
| out vec4 | out_Color |
| Fragment (out) pixel value. | |
| in vec3 | out_Normal |
| Fragment normal. | |
| in vec3 | out_ObjPos |
| Fragment position. | |
| in vec2 | out_TexCoord |
| Fragment texture coordinate. | |
| vec3 | r |
| Reflected light vector. | |
| vec3 | s |
| Incident light vector. | |
| uniform vec3 | size |
| Data size. | |
| vec3 | specLight |
| Specular light color. | |
| uniform sampler2D | terr_texUnit |
| Terrain (color) texture. | |
| vec3 | totalLight |
| Total light color. | |
Fragment shader for terrain rendering.
Definition in file terrainshader.frag.