// By Fallow Deer - fallowdeer.eu
#ifndef VD_WIND_GLSL
#define VD_WIND_GLSL
#include "/lib/settings.glsl"

float vd_wave(vec3 p, float t, float speed, float scale) {
    float a = sin(p.x * 0.55 + p.z * 0.33 + t * speed);
    float b = sin(p.x * 0.21 - p.z * 0.42 + t * speed * 1.37);
    return (a * 0.65 + b * 0.35) * scale * WAVE_STRENGTH;
}

bool vd_is_plant(float id) { return abs(id - 10010.0) < 0.5; }
bool vd_is_leaf(float id)  { return abs(id - 10011.0) < 0.5; }
bool vd_is_water(float id) { return abs(id - 10012.0) < 0.5; }

#endif
