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

Compute shader for creating a texture from buffers. More...

Go to the source code of this file.

Functions

 layout (local_size_x=16, local_size_y=16) in
 Size of calculation kernels on GPU, preferably multiple of 32.
 layout (std430, binding=0) readonly buffer inHeight
 < Input heightmap buffer
 layout (rgba32f, binding=0) writeonly uniform image2D textureOut
 Combine the height and normals and output to this texture.
void main ()

Variables

uniform float maxHeight
 The maximum height of the data.
uniform ivec2 size
 Width, Height of the data.

Detailed Description

Compute shader for creating a texture from buffers.

Used to create normal + height texture of the terrain so that the water rendering has information about the terrain.

Definition in file textureData.comp.


Function Documentation

layout ( std430  ,
binding  = 0 
)

< Input heightmap buffer

< Input normals buffer

Definition at line 11 of file textureData.comp.

 All Classes Files Functions Variables Enumerations