Macaw OS C reference

Function gpu_water

#include <macawgpu.h>
void gpu_water(int reflection, const gpu_wateropts *o);

Mixes a reflection into the marked water pixels, with ripples, a tint and a drifting surface, then clears the marks.

Parameters

reflectionint
The picture drawn from the mirrored camera. 0 for none, when you give a cube map in env.
oconst gpu_wateropts *
The address of your gpu_wateropts, or NULL for every option's usual value. A number below 0 (or tint at -1) means the usual, in brackets: - tintamount: how much of the tint is mixed in (0.2). - near, far: how much it reflects close to you (0.35) and far away (0.85). - ripple: how far ripples bend the reflection, in pixels (1.5). - time: the time in seconds, which moves the ripples (0). - flow: how fast the surface texture drifts (1). - surfaceamount: how much the surface texture shows (0.3). - drops: where drips fell, each { u, v, seconds ago } on the water's texture places. - tint: the colour mixed in (BLUE). - surface: a picture for the water's own surface (0: none). - env: a cube map from gpu_envmap to reflect instead of the picture (0: none). - ndrops: how many of drops are used, from 0 to 16.

In Reflecting water, with gpu_mask, gpu_clearmask, gpu_waterdefaults.