summaryrefslogtreecommitdiff
path: root/examples/shadow_maps
diff options
context:
space:
mode:
authorOmni <omniscient.oce@gmail.com>2024-06-22 23:06:19 +1000
committerOmni <omniscient.oce@gmail.com>2024-06-22 23:06:19 +1000
commit39e7122b5cd1e0d56a4a7cfd3c4114032d14e9b6 (patch)
treeb879e9796146f2a1d57cf9d44cfb3a6991b5d8cc /examples/shadow_maps
parenta2b43f8f93365874ba46dfaacd59df9e197c32e7 (diff)
creating shadowmap pipeline
Diffstat (limited to 'examples/shadow_maps')
-rw-r--r--examples/shadow_maps/ex_shadow_maps.c14
1 files changed, 12 insertions, 2 deletions
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);