From 39e7122b5cd1e0d56a4a7cfd3c4114032d14e9b6 Mon Sep 17 00:00:00 2001 From: Omni Date: Sat, 22 Jun 2024 23:06:19 +1000 Subject: creating shadowmap pipeline --- examples/shadow_maps/ex_shadow_maps.c | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) (limited to 'examples/shadow_maps') diff --git a/examples/shadow_maps/ex_shadow_maps.c b/examples/shadow_maps/ex_shadow_maps.c index e4f7f8a..1423d7a 100644 --- a/examples/shadow_maps/ex_shadow_maps.c +++ b/examples/shadow_maps/ex_shadow_maps.c @@ -17,6 +17,11 @@ const vec3 pointlight_positions[4] = { }; point_light point_lights[4]; +/* + TODO: +- keyboard button to switch between main camera and light camera +*/ + int main() { core_bringup(); arena scratch = arena_create(malloc(1024 * 1024), 1024 * 1024); @@ -28,8 +33,13 @@ int main() { ren_shadowmaps shadows = { .width = 1000, .height = 1000 }; // ren_shadowmaps_init(&shadows); - // Meshes - mesh cubes[4]; + // Set up the scene + // We want: + // 1. a ground plane + // 2. lights + // 3. some boxes + + mesh scene[5]; for (int i = 0; i < 4; i++) { geometry_data geo = geo_create_cuboid(f32x3(2,2,2)); cubes[i] = mesh_create(&geo, true); -- cgit v1.2.3-70-g09d2