System info & network

This commit is contained in:
2023-09-26 19:40:16 +02:00
commit 504ba77654
89 changed files with 39577 additions and 0 deletions

44
code/render/lights.h Normal file
View File

@@ -0,0 +1,44 @@
#ifndef _PIUMA_RENDER_LIGHTS_H_
#define _PIUMA_RENDER_LIGHTS_H_
struct r_sun_light
{
v3 direction;
f32 _padding0;
v3 color;
f32 intensity;
};
struct r_point_light
{
v3 position;
f32 _padding0;
v3 color;
f32 intensity;
};
struct r_spot_light
{
v3 position;
f32 inner_radius;
v3 color;
f32 intensity;
v3 direction;
f32 outer_radius;
};
#define MAX_SUN_LIGHTS 4
#define MAX_POINT_LIGHTS 128
#define MAX_SPOT_LIGHTS 128
struct r_light_container
{
u32 sun_light_count;
u32 point_light_count;
u32 spot_light_count;
f32 ambient_light;
r_sun_light sun_lights[MAX_SUN_LIGHTS];
r_point_light point_lights[MAX_POINT_LIGHTS];
r_spot_light spot_lights[MAX_SPOT_LIGHTS];
};
#endif