diff options
| author | tech kaczynski <tk@techkaczynski.dev> | 2026-09-22 22:38:57 +1000 |
|---|---|---|
| committer | tech kaczynski <tk@techkaczynski.dev> | 2026-09-22 22:38:57 +1000 |
| commit | 08cb8d6a585dd552b69a488d9db1be123f01467a (patch) | |
| tree | 77d50ce30bbc102b08486929ba654b5bef70af43 /env.h | |
initial commit.
Diffstat (limited to 'env.h')
| -rw-r--r-- | env.h | 46 |
1 files changed, 46 insertions, 0 deletions
@@ -0,0 +1,46 @@ +#ifndef ENV_H +#define ENV_H + +#include "common.h" +#include "res.h" + +typedef struct { + cstr sky_sdr_key, ocean_sdr_key; + + Vec3 sun_dir; + Vec3 moon_dir; + + Color sun_col; + Color moon_col; + Color ambient_col; + Color horizon_col; + Color zenith_col; + + f32 sun_intensity; + f32 moon_intensity; + f32 ambient_intensity; + + f32 day_amount; + f32 twilight_amount; + + f32 cycle; + f32 day_len; + + /* sun/moon textures */ + cstr sun_tex_key, moon_tex_key; + Color sun_tint, moon_tint; + f32 sun_sz, moon_sz; + + f32 ocean_height, ocean_time; +} Environment; + +extern Environment env; + +void env_init(void); +void env_exit(void); +void env_update(void); +void env_draw_sky(Camera); +void env_draw_ocean(Camera); + +#endif + |
