Waterflow
Visualize water in terrain
src/shaders/addFlowShader.comp File Reference

Compute shader for adding flow to the water. More...

Go to the source code of this file.

Functions

 layout (local_size_x=16, local_size_y=16) in
 This should be a nxn, where n is power of 2, however next step would result in 32x32, 1024 threads which is not always supported.
 layout (std430, binding=4) buffer height0
 < height ping.
void main ()

Variables

uniform ivec2 size
 width height

Detailed Description

Compute shader for adding flow to the water.

Definition in file addFlowShader.comp.


Function Documentation

layout ( std430  ,
binding  = 4 
)

< height ping.

< Terrain height read buffer

< Terrain height buffer

< VelocityY buffer

< VelocityX buffer

< height read buffer

< Input normals buffer

< Counter of how many holes are left, when 0 algorithm is done

< Output heightbuffer, with less holes

< Normals to be written.

< the terrheight which is used to create the model.

< indices to be written.

< Texcoords to be written

< Read buffer for terrainHeight

< Read/write buffer for velocity

< Write buffer for heights

< VelocityY pong buffer

< VelocityY ping buffer

< VelocityX pong buffer

< VelocityX ping buffer

< height pong buffer

< VelocityY write buffer

< height Ping buffer

< Terrain height

< VelocityY read buffer

< VelocityX write buffer

< VelocityX read buffer

< height Pong buffer

< Write buffer for model out height

< Read buffer for height of terrain

< added water.

< Terrain read buffer

< Velocity, read write buffer

< height pong.

Definition at line 9 of file addFlowShader.comp.

 All Classes Files Functions Variables Enumerations