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

Compute shader for updating the velocities. 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) readonly buffer height0
 < height ping buffer
void main ()

Variables

uniform float dt
 simulation dt
uniform ivec2 size
 width height

Detailed Description

Compute shader for updating the velocities.

Definition in file updateVelocityShader.comp.


Function Documentation

layout ( std430  ,
binding  = 4 
)

< height ping buffer

< Terrain height read buffer

< VelocityY read buffer

< VelocityY write buffer

< VelocityX read buffer

< VelocityX write buffer

< height pong buffer

Definition at line 9 of file updateVelocityShader.comp.

 All Classes Files Functions Variables Enumerations