better lighting
This commit is contained in:
parent
805a2713a3
commit
6ed4e17065
75 changed files with 6417 additions and 3667 deletions
|
|
@ -6,6 +6,7 @@
|
|||
#include "pxl8_mesh.h"
|
||||
#include "pxl8_types.h"
|
||||
|
||||
typedef struct pxl8_bsp pxl8_bsp;
|
||||
typedef struct pxl8_gfx pxl8_gfx;
|
||||
|
||||
typedef struct pxl8_3d_uniforms {
|
||||
|
|
@ -17,7 +18,16 @@ typedef struct pxl8_3d_uniforms {
|
|||
f32 time;
|
||||
} pxl8_3d_uniforms;
|
||||
|
||||
typedef struct pxl8_3d_frame_desc {
|
||||
const pxl8_bsp* bsp;
|
||||
const pxl8_3d_camera* camera;
|
||||
const pxl8_lights* lights;
|
||||
const pxl8_sdf* sdf;
|
||||
pxl8_3d_uniforms uniforms;
|
||||
} pxl8_3d_frame_desc;
|
||||
|
||||
typedef struct pxl8_3d_frame {
|
||||
const pxl8_bsp* bsp;
|
||||
pxl8_vec3 camera_dir;
|
||||
pxl8_vec3 camera_pos;
|
||||
f32 far_clip;
|
||||
|
|
@ -25,6 +35,7 @@ typedef struct pxl8_3d_frame {
|
|||
u32 lights_count;
|
||||
f32 near_clip;
|
||||
pxl8_mat4 projection;
|
||||
const pxl8_sdf* sdf;
|
||||
pxl8_3d_uniforms uniforms;
|
||||
pxl8_mat4 view;
|
||||
} pxl8_3d_frame;
|
||||
|
|
@ -33,6 +44,8 @@ typedef struct pxl8_3d_frame {
|
|||
extern "C" {
|
||||
#endif
|
||||
|
||||
void pxl8_3d_set_bsp(pxl8_gfx* gfx, const pxl8_bsp* bsp);
|
||||
void pxl8_3d_set_sdf(pxl8_gfx* gfx, const pxl8_sdf* sdf);
|
||||
void pxl8_3d_begin_frame(pxl8_gfx* gfx, const pxl8_3d_camera* camera, const pxl8_lights* lights, const pxl8_3d_uniforms* uniforms);
|
||||
void pxl8_3d_clear(pxl8_gfx* gfx, u8 color);
|
||||
void pxl8_3d_clear_depth(pxl8_gfx* gfx);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue